/* ============================================================
   components.css — property cards, compound cards, project cards
   All values reference var(--*) from variables.css
   ============================================================ */

/* ── PROPERTY CARD ────────────────────────────────────────── */
.prop-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 8px 24px 2px rgba(35, 72, 78, 0.35);
  flex-shrink: 0;
  width: 384px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px 4px rgba(35, 72, 78, 0.4);
}

.prop-card__image {
  position: relative;
  height: 212px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.prop-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ribbon badge — flush left edge of image, right side rounded */
.prop-card__badge {
  position: absolute;
  top: 12px;
  left: 0;
  padding: 5px 12px 5px 9px;
  border-radius: 0 6px 6px 0;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  background: #B6785D;
  z-index: 1;
  letter-spacing: 0.02em;
}

.prop-card__badge--rent { background: var(--color-for-rent); }

/* Action buttons (share + heart) — top-right of image */
.prop-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 1;
}

.prop-card__action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #3E8CA0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: opacity var(--transition);
}

.prop-card__action-btn:hover { opacity: 0.8; }

/* Developer logo circle — bottom-left of image */
.prop-card__logo {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
  flex-shrink: 0;
}

.prop-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.prop-card__logo-initials {
  font-size: 13px;
  font-weight: 700;
  color: #B7B7B7;
  letter-spacing: 0.05em;
}

/* Card body */
.prop-card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  padding-top: 15px;
}

.prop-card__title {
  font-size: 18px;
  font-weight: 700;
  color: #1F2024;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prop-card__location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  color: #315E6D;
  margin: 7px 0 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prop-card__payment {
  font-size: 12px;
  font-weight: 700;
  color: #8D8E95;
  margin: 16px 0 0;
}

.prop-card__rate {
  font-size: 10px;
  font-weight: 700;
  color: #A9A9AD;
  margin: 4px 0 0;
}

.prop-card__price {
  font-size: 22px;
  font-weight: 800;
  color: #3E8CA0;
  margin: 2px 0 0;
  line-height: 1.2;
}

.prop-card__units {
  font-size: 13px;
  font-weight: 500;
  color: #1F2024;
  margin: 20px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Specs row — beds / baths / sqft */
.prop-card__specs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.prop-card__spec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray);
}

.prop-card__spec svg { flex-shrink: 0; color: #3E8CA0; }

.spec-divider {
  width: 1px;
  height: 14px;
  background: var(--color-casal-200);
  flex-shrink: 0;
}

/* Card footer */
.prop-card__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 15px;
  margin-top: 16px;
  border-top: 1px solid #BFDDE4;
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 18px;
  border: 2px solid #3E8CA0;
  border-radius: 6px;
  color: #3E8CA0;
  font-size: 13px;
  font-weight: 700;
  background: #FFFFFF;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-read-more:hover {
  background: var(--color-primary-light);
  color: var(--color-white);
}

.prop-card__contact {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.contact-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #3E8CA0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #3E8CA0;
  transition: opacity var(--transition);
}

.contact-icon-btn:hover { opacity: 0.7; }

/* ── COMPOUND CARD (Top Compounds) ─────────────────────────── */
.compound-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  width: 208px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.compound-card:hover { transform: translateY(-3px); }

.compound-card.active {
  background: linear-gradient(135deg, #192b33 0%, #325a69 100%);
}

.compound-card__image {
  position: relative;
  width: 192px;
  height: 192px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.compound-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compound-card__badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 10px;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.compound-card__body {
  padding: 4px 4px 8px;
}

.compound-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 4px;
}

.compound-card.active .compound-card__name { color: var(--color-white); }

.compound-card__count {
  font-size: 12px;
  color: var(--color-primary-light);
  margin: 0;
}

.compound-card.active .compound-card__count { color: var(--color-accent-light); }

/* ── AREA CARD (Top Areas) ──────────────────────────────────── */
.area-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  width: 208px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.area-card:hover { transform: translateY(-3px); }

.area-card__image {
  width: 192px;
  height: 192px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.area-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.area-card__body {
  padding: 4px 4px 8px;
}

.area-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 4px;
}

.area-card__meta {
  font-size: 12px;
  color: var(--color-primary-light);
  margin: 0;
}

/* ── PROJECT CARD (Explore New Projects) ───────────────────── */
.project-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  flex-shrink: 0;
  width: 408px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease;
}

.project-card:hover { transform: translateY(-4px); }

.project-card__image {
  height: 232px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card__image img { transform: scale(1.04); }

.project-card__body {
  text-align: center;
  padding: 4px 8px 8px;
}

.project-card__title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-black);
  margin: 0 0 8px;
  line-height: 1.2;
}

.project-card__desc {
  font-size: 18px;
  color: var(--color-gray);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── LOADING SPINNER ──────────────────────────────────────── */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  color: var(--color-primary);
}

/* ── Dots / carousel indicators ────────────────────────────── */
.carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

.carousel-dot {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.1);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), width var(--transition);
}

.carousel-dot.active {
  background: var(--color-accent-light);
  width: 32px;
}
