/**
 * MANZIL - Dubai Real Estate Marketplace
 * Brand Styling: Primary #FFAF13 | Secondary #111111 | Background #FFFFFF | AED Currency
 * Responsive Mobile-First Marketplace CSS
 */

:root {
  --manzil-primary: #FFAF13;
  --manzil-primary-hover: #e59905;
  --manzil-primary-light: #fff8eb;
  --manzil-dark: #111111;
  --manzil-dark-hover: #1e1e1e;
  --manzil-light-bg: #F8FAFC;
  --manzil-card-border: #E2E8F0;
  --manzil-text-muted: #64748B;
  --manzil-whatsapp: #25D366;
  --manzil-whatsapp-hover: #1EBE5D;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--manzil-dark);
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =====================================================================
   TOPBAR
   ===================================================================== */
.topbar-manzil {
  background-color: #0b0b0b;
  color: #94a3b8;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
}

.topbar-manzil a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s;
}

.topbar-manzil a:hover {
  color: var(--manzil-primary);
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn-manzil, .btn-primary {
  background-color: var(--manzil-primary) !important;
  border-color: var(--manzil-primary) !important;
  color: #111111 !important;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
}

.btn-manzil:hover, .btn-primary:hover {
  background-color: var(--manzil-primary-hover) !important;
  border-color: var(--manzil-primary-hover) !important;
  color: #000000 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 175, 19, 0.3);
}

.btn-dark-manzil {
  background-color: var(--manzil-dark);
  color: #ffffff;
  border: 1px solid var(--manzil-dark);
  font-weight: 600;
  border-radius: 8px;
}

.btn-dark-manzil:hover {
  background-color: var(--manzil-dark-hover);
  color: var(--manzil-primary);
  border-color: var(--manzil-primary);
}

.btn-outline-manzil {
  border: 2px solid var(--manzil-primary);
  color: var(--manzil-dark);
  font-weight: 600;
  background: transparent;
  border-radius: 8px;
}

.btn-outline-manzil:hover {
  background-color: var(--manzil-primary);
  color: #111111;
}

.btn-whatsapp {
  background-color: var(--manzil-whatsapp) !important;
  border-color: var(--manzil-whatsapp) !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
}

.btn-whatsapp:hover {
  background-color: var(--manzil-whatsapp-hover) !important;
  border-color: var(--manzil-whatsapp-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navbar-manzil {
  background-color: #ffffff;
  border-bottom: 2px solid #f1f5f9;
  padding: 12px 0;
}

.navbar-brand img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.navbar-manzil .nav-link {
  font-weight: 500;
  color: #1e293b;
  padding: 8px 14px !important;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.navbar-manzil .nav-link:hover, 
.navbar-manzil .nav-link.active {
  color: #0f172a;
  background-color: var(--manzil-primary-light);
  font-weight: 600;
}

/* =====================================================================
   HERO BANNER & SEARCH
   ===================================================================== */
.hero-banner {
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.94) 0%, rgba(26, 26, 26, 0.96) 100%), 
              url('../images/banner-hero.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 75px 0 85px 0;
  position: relative;
  overflow: hidden;
}

.hero-tagline {
  color: var(--manzil-primary);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.hero-title {
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
}

/* Search Box Card */
.search-filter-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--manzil-card-border);
  margin-top: -45px;
  position: relative;
  z-index: 10;
  padding: 24px;
}

.purpose-tabs .btn-tab {
  padding: 10px 24px;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  transition: all 0.15s ease;
}

.purpose-tabs .btn-tab.active {
  background-color: var(--manzil-dark);
  color: var(--manzil-primary);
  border-color: var(--manzil-dark);
}

/* =====================================================================
   PROPERTY CARDS
   ===================================================================== */
.property-card {
  border-radius: 14px;
  border: 1px solid var(--manzil-card-border);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
}

.property-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 230px;
  background-color: #f1f5f9;
  overflow: hidden;
}

.property-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-card:hover .property-card-img-wrapper img {
  transform: scale(1.04);
}

.property-purpose-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(17, 17, 17, 0.9);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.property-featured-badge {
  position: absolute;
  top: 46px;
  left: 12px;
  background: var(--manzil-primary);
  color: #111111;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-favorite-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.05rem;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  padding: 0;
}

.btn-favorite-toggle:hover {
  background: #ffffff;
  transform: scale(1.12);
  color: #ef4444;
}

.btn-favorite-toggle.is-favorited i,
.btn-favorite-toggle .bi-heart-fill {
  color: #ef4444 !important;
}

.property-photos-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(17, 17, 17, 0.75);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.property-price {
  color: var(--manzil-dark);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.property-price span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--manzil-text-muted);
}

.property-specs {
  display: flex;
  gap: 14px;
  color: var(--manzil-text-muted);
  font-size: 0.88rem;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 10px 0;
  margin: 12px 0;
}

.property-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Property Card in List View */
.property-card-list {
  display: flex;
  flex-direction: row;
  height: auto;
}

@media (max-width: 991px) {
  .property-card-list {
    flex-direction: column;
  }
}

.property-card-list .property-card-img-wrapper {
  width: 320px;
  min-width: 320px;
  height: 100%;
  min-height: 240px;
}

@media (max-width: 991px) {
  .property-card-list .property-card-img-wrapper {
    width: 100%;
    min-width: 100%;
    height: 220px;
  }
}

/* =====================================================================
   PROPERTY DETAILS & GALLERY
   ===================================================================== */
.gallery-stage {
  position: relative;
  width: 100%;
  height: 480px;
  background-color: #0b0b0b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .gallery-stage {
    height: 320px;
    border-radius: 12px;
  }
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.gallery-thumbs-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.gallery-thumb-item {
  width: 105px;
  height: 75px;
  min-width: 105px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: all 0.15s ease;
}

.gallery-thumb-item:hover, .gallery-thumb-item.active {
  opacity: 1;
  border-color: var(--manzil-primary);
  transform: translateY(-2px);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sticky Agent Card */
.sticky-agent-card {
  position: sticky;
  top: 90px;
  border-radius: 16px;
  border: 1px solid var(--manzil-card-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

/* Specs Grid Box */
.spec-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.spec-box .spec-label {
  font-size: 0.8rem;
  color: var(--manzil-text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.spec-box .spec-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--manzil-dark);
}

/* Amenities Checklist */
.amenity-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  margin-right: 8px;
  margin-bottom: 8px;
}

.amenity-chip i {
  color: #10b981;
  margin-right: 8px;
  font-size: 1rem;
}

/* =====================================================================
   COMMUNITIES & CATEGORY CARDS
   ===================================================================== */
.community-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 200px;
  display: block;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;
}

.community-card:hover {
  transform: translateY(-4px);
}

.community-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.community-card:hover img {
  transform: scale(1.06);
}

.community-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(17,17,17,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #ffffff;
}

/* Filter Tag Pill */
.filter-pill {
  display: inline-flex;
  align-items: center;
  background-color: #e2e8f0;
  color: #334155;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 6px;
}

.filter-pill a {
  color: #64748b;
  margin-left: 6px;
  text-decoration: none;
}

.filter-pill a:hover {
  color: #ef4444;
}

/* =====================================================================
   MOBILE FLOATING BAR
   ===================================================================== */
.mobile-action-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-action-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 10px 16px;
    z-index: 1030;
    border-top: 1px solid #e2e8f0;
    align-items: center;
    justify-content: space-between;
  }
}

/* Footer */
footer.manzil-footer {
  background-color: var(--manzil-dark);
  color: #94a3b8;
  margin-top: auto;
  border-top: 3px solid var(--manzil-primary);
}

footer.manzil-footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s;
}

footer.manzil-footer a:hover {
  color: var(--manzil-primary);
}
