/* =======================================================
   JamiaBricks — Master Layout
   Font: Poppins | Full-width, zero side-gaps
   ======================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --font:        'Poppins', Arial, Helvetica, sans-serif;
  --primary:     #1565c0;
  --primary-dk:  #0d47a1;
  --accent:      #e65100;
  --green:       #2e7d32;
  --topbar-bg:   #0f172a;
  --header-bg:   #ffffff;
  --nav-bg:      #1e40af;
  --nav-hover:   #1d4ed8;
  --card:        #ffffff;
  --bg:          #f1f5f9;
  --border:      #e2e8f0;
  --text:        #1e293b;
  --muted:       #64748b;
  --radius:      8px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
}

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

html { scroll-behavior: smooth; }

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font) !important;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a {
  font-family: var(--font);
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
a:hover { color: var(--accent); }
a img { border: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

input, select, textarea, button {
  font-family: var(--font);
  font-size: 14px;
}

.clear { clear: both; height: 0; line-height: 0; font-size: 0; margin: 0; padding: 0; }

/* ---------- Wrapper ---------- */
#wrap { width: 100%; margin: 0; padding: 0; }

/* =======================================================
   TOP BAR
   ======================================================= */
#topbar {
  background: var(--topbar-bg);
  width: 100%;
  height: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
}

#topbar ul {
  display: flex;
  flex-wrap: wrap;
  float: none;
  padding: 0;
  gap: 2px;
}

#topbar li { display: flex; align-items: center; }

#topbar a,
#topbar a:visited,
#topbar a:active,
#topbar a:hover {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  padding: 11px 14px;
  height: auto;
  float: none;
  margin: 0;
  display: block;
  text-decoration: none;
  background: none !important;
  background-image: none !important;
  transition: color .2s, background .2s;
  border-radius: 4px;
  letter-spacing: .2px;
}

#topbar a:hover,
#topbar .current a,
#topbar .current a:visited,
#topbar .current a:active {
  color: #f1f5f9;
  background: rgba(255,255,255,.08) !important;
}

/* Create account CTA links in topbar */
#topbar a.topbar-cta,
#topbar a.topbar-cta:visited {
  color: #fbbf24 !important;
  font-weight: 600;
}
#topbar a.topbar-cta:hover { color: #fde68a !important; }

li.topbar-divider {
  width: 1px;
  background: rgba(255,255,255,.15);
  margin: 8px 4px;
  align-self: stretch;
  padding: 0 !important;
}

/* Mobile-only top bar (hidden on desktop via responsive.css) */
#mobile-bar { display: none; }

/* Accordion arrows — desktop: hidden. Mobile enables them inside @media block */
.acc-arrow { display: none; }

/* Accordion headers — no pointer cursor or layout change on desktop */
.acc-header { cursor: default; }
.acc-header h2 { pointer-events: none; }

/* =======================================================
   HEADER  — full width, all components fit in one row
   ======================================================= */
#header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 110px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Logo block */
#sitename {
  float: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 16px;
  border-right: 1px solid var(--border);
}
#sitename img {
  max-height: 90px;
  width: auto;
  display: block;
}
h1#logo {
  margin: 0; padding: 0;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

/* Helpic / shoutout image block */
#shoutout {
  float: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
}
#shoutout img {
  max-height: 86px;
  width: auto;
  display: block;
  border-radius: 6px;
}

/* Accounts + Login — fills all remaining space, content pinned to right */
#useractions {
  float: none;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 10px 24px 10px 20px;
  background: none;
}

/* Account type links row */
#headings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 20px;
  padding: 0 0 8px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--border);
  background: none;
  width: 100%;
}
#headings h2 {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--text);
  text-transform: none;
  white-space: nowrap;
}
#headings h2 img { display: inline-block; vertical-align: middle; flex-shrink: 0; }
#headings a { color: var(--primary); font-size: 13px; font-weight: 600; }
#headings a:hover { color: var(--accent); }

/* Login section */
#login {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

p.already-registered {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  text-align: left;
  align-self: flex-start;
}

#loginform { width: 100%; }
#loginform form { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* Fields row: Username | Password | LOGIN in one line */
.login-fields {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

/* Remember me + Forgot password below the fields */
.login-below {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
}
.login-below label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.login-below a {
  font-size: 12px;
  color: var(--primary);
}
.login-below a:hover { color: var(--accent); }

.formblock {
  float: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  margin-right: 0;
  flex: 0 0 auto;
}

.formblock label {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 0;
  white-space: nowrap;
}

.formblock .textfields,
.login-fields .textfields {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 10px;
  height: auto;
  width: 150px;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  display: block;
  appearance: none;
  -webkit-appearance: none;
}
.formblock .textfields:focus,
.login-fields .textfields:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

.loginbtn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  padding: 7px 18px;
  height: auto;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.loginbtn:hover { background: var(--primary-dk); }

#loginform p {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
  width: 100%;
}

/* =======================================================
   NAVIGATION (menu.html included inline)
   ======================================================= */
#nav-bar {
  background: var(--nav-bg);
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: visible;
  position: relative;
}

/* =======================================================
   CONTENT AREA
   ======================================================= */
#content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  min-height: 400px;
}

#home_main, #main {
  flex: 0 0 70%;
  width: 70%;
  min-width: 0;
  float: none;
  padding: 10px 20px 20px 24px;
  margin: 0;
  box-sizing: border-box;
}

#home_sidebar, #sidebar {
  flex: 0 0 30%;
  width: 30%;
  float: none;
  padding: 0;
  margin: 0;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-sizing: border-box;
  min-width: 0;
}

#content #sidebar { background: var(--card); }

/* =======================================================
   SEARCH BOX
   ======================================================= */
#home_main #search,
#main #search,
#search {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  height: auto;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}

#search .tab {
  background: var(--primary);
  height: auto;
  padding: 12px 16px;
}

.tab h2 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #ffffff;
  margin: 0;
}

.tab ul { display: none; }

#search .container {
  background: transparent;
  height: auto;
  padding: 16px;
  width: 100%;
  margin: 0;
}

/* Search form — 3 fields per row grid */
.sf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 20px;
  padding: 4px 0 8px;
}
.sf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sf-label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.sf-input {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  padding: 7px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s;
}
.sf-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.1);
}
.sf-submit {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 4px;
}

/* Both left and right label cells that contain a <p> */
.search_form td.test p {
  margin: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

/* All inputs and selects — identical style */
.search_form select,
.search_form input[type="text"],
.search_form input[type="number"] {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  padding: 7px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
  display: block;
}

.search_form select:focus,
.search_form input[type="text"]:focus,
.search_form input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

.text {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.test {
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
}

/* =======================================================
   HOT PROPERTIES SIDEBAR
   ======================================================= */
.sidebar_head {
  font-family: var(--font) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #ffffff !important;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dk) 100%);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}
.sidebar_head, .sidebar_head * { color: #ffffff !important; }
.sidebar_head .h2link { display: none; }

/* Hot properties wrapper padding */
#acc-hotprop {
  padding: 12px 0;
}

/* Hot properties slider */
.hot-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.hot-slide {
  display: none;
  animation: hotFadeIn .5s ease;
}
.hot-slide.active { display: block; }

@keyframes hotFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hot-slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 10px;
}
.hot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: background .2s;
}
.hot-dot.active { background: var(--primary); }

/* Hot property card */
.hot-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.hot-card-img {
  flex: 0 0 110px;
  width: 110px;
  min-height: 110px;
  overflow: hidden;
  background: #f1f5f9;
  border-radius: var(--radius) 0 0 var(--radius);
}
.hot-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hot-card-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 12px 12px 14px;
}
.hot-card-info h3 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
}
.hot-card-info p {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.hot-label { font-weight: 600; color: #475569; }

.hot-card-desc {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
  background: #f8fafc;
}
.hot-more-full {
  display: block !important;
  text-align: center;
  padding: 9px 0;
  background: var(--primary);
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 0 !important;
  text-decoration: none;
}
.hot-price {
  font-family: var(--font) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
}
.hot-more {
  display: inline-block;
  margin-top: 2px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.hot-more:hover { color: var(--accent); }

/* Sidebar ad blocks */
.sidebar-ad-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.sidebar-ad-item {
  width: 100%;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.sidebar-ad-item img {
  width: 100% !important;
  height: 160px !important;
  max-width: 100% !important;
  display: block !important;
  border-radius: var(--radius);
  object-fit: cover;
}
.sidebar-ad-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 2px 0;
  font-family: var(--font);
  font-size: 11px;
  color: var(--muted);
}
.sidebar-ad-info strong {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}

/* Legacy .price class used elsewhere */
.price {
  display: block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
}

/* =======================================================
   CATEGORIES BAR
   ======================================================= */
#topcategorieslink {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: auto;
  padding: 0;
  margin: 16px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

#topcategorieslink h2 {
  background: var(--primary);
  height: auto;
  width: auto;
  padding: 10px 16px;
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  float: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

#topcategorieslink ul {
  display: flex;
  flex-wrap: wrap;
  float: none;
  padding: 6px 10px;
  width: auto;
  flex: 1 1 0;
  gap: 5px;
}

#topcategorieslink li {
  display: inline;
  font-family: var(--font);
  font-size: 12px;
}

#topcategorieslink a,
#topcategorieslink a:visited,
#topcategorieslink a:hover {
  display: inline-block;
  float: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  height: auto;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f8fafc;
  color: var(--primary);
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
#topcategorieslink a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

#topcategorieslink #searchagain { float: none; width: auto; padding: 0; }

/* =======================================================
   PROPERTY LISTING
   ======================================================= */

.section-heading {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dk) 100%);
  padding: 10px 16px;
  border-radius: var(--radius);
  margin: 0 0 12px 0;
  letter-spacing: .4px;
}
.listing li {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
  overflow: hidden;
  list-style: none;
}
.listing li:hover { box-shadow: var(--shadow); }

/* Card: left info | right buttons */
.listing-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
}

/* Left block: thumbnail + details side by side */
.listing-left {
  flex: 1 1 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  min-width: 0;
}

.listing-thumb {
  flex: 0 0 100px;
  width: 100px;
  height: 95px;
  object-fit: cover;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: block;
  background: #f1f5f9;
}

.listing-details {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.listing-details h3 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  margin: 0;
}

.listing-details p {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  margin: 0;
}

.listing-details .lbl {
  font-weight: 600;
  color: #475569;
}

.listing-price {
  font-family: var(--font) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
}

/* Right block: stacked action buttons */
.listing-actions {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 14px;
  border-left: 1px solid var(--border);
  background: #f8fafc;
}

.btn-action {
  display: block;
  width: 100%;
  padding: 8px 0;
  text-align: center;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s, color .18s;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff !important;
  border: none;
}
.btn-primary:hover { background: var(--primary-dk); color: #fff !important; }

.btn-secondary {
  background: #fff;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: #fff !important; }


/* Legacy selectors kept for other pages */
.listinfo h3 { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--green); }
.listingbtns .listbuttons { background: var(--primary); border-radius: 6px; display: block; padding: 6px 0; text-align: center; margin-bottom: 6px; font-family: var(--font); font-size: 12px; }
.listingbtns .listbuttons a { color: #fff; font-family: var(--font); font-size: 12px; text-decoration: none; }

/* =======================================================
   SINGLE ITEM
   ======================================================= */
#main h1 {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-dk));
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

#main #single_item_details { background: var(--card); border-radius: var(--radius); padding: 0; }

#single_item_details h2 {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  color: var(--green);
  display: block;
  margin-bottom: 12px;
  padding: 12px 16px 0;
}

#single_item_details .user {
  display: block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0 16px;
}

#leftcolumn  { float: left;  width: 48%; padding: 12px; }
#rightcolumn { float: right; width: 48%; padding: 12px; }

#rightcolumn .price {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  padding: 8px 0;
}

.previewimg {
  display: inline-block;
  background: #f1f5f9;
  padding: 3px;
  border: 2px solid #94a3b8;
  border-radius: var(--radius);
}

#imagesgallerylisting { padding: 12px; }

#moredetails {
  margin: 12px;
  background: #eff6ff;
  padding: 12px;
  border-radius: var(--radius);
}
#moredetails h3 {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 0 6px;
  display: block;
}
#moredetails li { padding: 3px 0; display: block; font-size: 13px; }

#listing_details { padding: 12px; }
#listing_details td { padding: 5px 8px; vertical-align: top; font-size: 13px; font-family: var(--font); }

#midraw_details {
  background: #fef9f0;
  border: 1px solid #fed7aa;
  padding: 12px;
  margin: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

/* =======================================================
   PAGINATION
   ======================================================= */

.pagination-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 4px;
  flex-wrap: wrap;
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
}
.pagination-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s;
}
.pagination-bar a:hover { background: var(--primary-dk); }
.page-info {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}
#paginations { background: #334155; padding: 8px 12px; border-radius: var(--radius); }
#paginations li { display: inline; }

#wrap #content #main #paginations a {
  display: inline-block;
  float: none;
  text-align: center;
  height: auto;
  width: auto;
  min-width: 30px;
  padding: 4px 8px;
  margin-right: 4px;
  color: #e2e8f0;
  text-decoration: none;
  background: #475569;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font);
}
#wrap #content #main #paginations .current a { color: #fff; background: var(--primary); }
#wrap #content #main #paginations a:hover  { color: #fff; background: var(--primary); }

/* =======================================================
   MISC
   ======================================================= */
.head {
  display: block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  background: var(--primary);
  padding: 10px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.block { padding: 8px; }
.block p { font-family: var(--font); font-size: 13px; line-height: 1.6; padding: 8px; }

.smsalert {
  background: #334155;
  color: #e2e8f0;
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

a.highlight { color: var(--accent) !important; }

.normalmenu li {
  display: block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.normalmenu a,
.normalmenu a:visited,
.normalmenu a:active {
  display: block;
  padding: 8px 12px 8px 28px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  background: url(../images/bulletarrow.jpg) no-repeat 8px center;
}
.normalmenu a:hover { color: var(--primary); background-color: #f0f7ff; }

.imagegallink a {
  display: block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.h2link a,
.h2link a:visited,
.h2link a:hover,
.h2link a:active { color: #e2e8f0; text-decoration: none; }

h1 a, h2 a, h3 a { text-decoration: none; }
h3 a:hover { color: var(--primary); }

/* =======================================================
   FORMS (global)
   ======================================================= */
.form-control {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  height: auto;
  line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

/* =======================================================
   FOOTER
   ======================================================= */
#wrap #footer {
  background: #0f172a;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

#footer #upperfooter {
  padding: 20px 24px;
  height: auto;
  line-height: normal;
}

#wrap #footer #lowerfooter {
  padding: 12px 24px;
  color: #64748b;
  font-family: var(--font);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

#lowerfooter a,
#lowerfooter .backtotop { color: #64748b; text-decoration: none; }
#lowerfooter a:hover { color: #94a3b8; }
.backtotop { display: block; float: right; }

#loginform p { line-height: 1.5; }

/* =======================================================
   MODAL OVERLAY & DIALOG
   ======================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dk) 100%);
  border-radius: 10px 10px 0 0;
}
.modal-header h3 {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: .3px;
}

.modal-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,.3); }

.modal-body {
  padding: 20px 24px 24px;
}

.modal-subtitle {
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.modal-label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.modal-field .reg-input,
.modal-field textarea.reg-input {
  width: 100%;
  box-sizing: border-box;
}

.modal-field textarea.reg-input {
  resize: vertical;
  min-height: 72px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}
.modal-actions .btn-action {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* =======================================================
   REGISTRATION FORM
   ======================================================= */
/* Registration section cards */
.reg-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}
.reg-section-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-dk));
  padding: 11px 18px;
  letter-spacing: .3px;
}
.reg-section-body {
  padding: 18px 18px 8px;
}

.reg-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 640px;
}

.reg-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.reg-row-half {
  flex-direction: row;
  gap: 20px;
}

.reg-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.reg-label {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.req { color: #e53e3e; }

.reg-input {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  height: auto;
}

.reg-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

.reg-select { appearance: none; -webkit-appearance: none; cursor: pointer; }

.reg-field { display: flex; flex-direction: column; gap: 6px; }

.reg-inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.reg-inline .reg-input { flex: 1 1 0; }

.reg-radio-group {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
  padding: 6px 0;
}

.radio-opt {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.reg-submit-row {
  margin-top: 8px;
  flex-direction: row;
}

.reg-submit-btn {
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  font-family: var(--font);
}

/* ---------- File upload field ---------- */
.upload-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: #f8fafc;
  transition: border-color .2s;
  cursor: pointer;
}
.upload-field:hover,
.upload-field:focus-within {
  border-color: var(--primary);
  background: #eff6ff;
}
.upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.upload-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.upload-hint {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
}

/* =======================================================
   SEARCH RESULTS
   ======================================================= */
.sr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 6px;
}
.sr-count {
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 20px;
}
.sr-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
}
.sr-list { display: flex; flex-direction: column; gap: 16px; }

.sr-card {
  display: flex;
  flex-direction: row;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s;
}
.sr-card:hover { box-shadow: var(--shadow); }

.sr-card-img {
  flex: 0 0 200px;
  width: 200px;
  min-height: 150px;
  overflow: hidden;
  background: #f1f5f9;
}
.sr-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sr-card-body {
  flex: 1;
  padding: 16px 18px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.sr-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sr-location { font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--primary); margin: 0; }
.sr-price    { font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.sr-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-tag {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text);
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}
.sr-tag-purpose { background: #dbeafe; border-color: #bfdbfe; color: var(--primary); font-weight: 600; }

.sr-card-actions {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-left: 1px solid var(--border);
  background: #fafafa;
}
.sr-card-actions .btn-action {
  width: 100%;
  text-align: center;
  font-size: 12px;
  padding: 8px 10px;
  text-decoration: none;
}

.sr-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.sr-page-btn {
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background .15s;
}
.sr-page-btn:hover  { background: var(--primary); color: #fff; border-color: var(--primary); }
.sr-page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* =======================================================
   SINGLE ITEM / PROPERTY DETAIL
   ======================================================= */
.pd-card {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.pd-gallery {
  flex: 0 0 240px;
  min-width: 0;
}

.pd-main-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f1f5f9;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
}
.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s;
}
.pd-main-img:hover img { transform: scale(1.03); }

.pd-img-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.pd-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-company {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.pd-meta {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
}

.pd-price {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.pd-location {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
}

.pd-contact-btn {
  display: inline-block;
  width: auto;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* Features grid */
.pd-features-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.pd-features-wrap .section-heading {
  border-radius: 0;
  margin: 0;
}

.pd-features {
  display: flex;
  flex-direction: row;
  gap: 0;
  padding: 16px 20px;
}

.pd-features-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.pd-features-col + .pd-features-col {
  border-left: 1px solid var(--border);
  padding-left: 24px;
  margin-left: 24px;
}

.pd-feat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pd-feat-lbl {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.pd-feat-val {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.pd-description {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fafcff;
}
.pd-description p {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  margin: 6px 0 0;
}

/* Gallery modal specifics */
.gallery-modal-body {
  padding: 16px;
  text-align: center;
  background: #0f172a;
}
.gallery-nav-btn {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
}
.gallery-nav-btn:hover { background: rgba(255,255,255,.25); }

@media (max-width: 700px) {
  .pd-card { flex-direction: column; }
  .pd-gallery { flex: 0 0 auto; width: 100%; }
  .pd-features { flex-direction: column; }
  .pd-features-col + .pd-features-col {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    margin-left: 0;
    padding-top: 16px;
    margin-top: 6px;
  }
}
