/* ===== Property Card - Complete Redesign ===== */

.pc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid #f0f0f0;
}

.pc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: inherit;
}

/* Image Section */
.pc-card__image {
  position: relative;
  width: 100%;
  padding-top: 60%;
  overflow: hidden;
  background: #f3f4f6;
}

.pc-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pc-card:hover .pc-card__image img {
  transform: scale(1.05);
}

/* Badges */
.pc-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.pc-card__badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pc-card__badge--rent {
  background: #10b981;
  color: #ffffff;
}

.pc-card__badge--sale {
  background: #3b82f6;
  color: #ffffff;
}

.pc-card__badge--featured {
  background: #fef3c7;
  color: #d97706;
}

.pc-card__badge--boosted {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #ffffff;
}

/* Wishlist */
.pc-card__wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  z-index: 2;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s;
}

.pc-card__wishlist i {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pc-card__wishlist.saved i {
  color: #ef4444;
}

.pc-card__wishlist:hover {
  transform: scale(1.15);
}

/* Price Overlay */
.pc-card__price-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 100%);
  z-index: 2;
}

.pc-card__price {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.pc-card__price-period {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
}

.pc-card__price-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

/* Content Section */
.pc-card__content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

/* Header - Title + Type */
.pc-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pc-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-card__type {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #f3f4f6;
  color: #6b7280;
}
/* Property type color variants */
.pc-card__type--house {
  background: #fef3c7;
  color: #92400e;
}
.pc-card__type--apartment {
  background: #dbeafe;
  color: #1e40af;
}
.pc-card__type--villa {
  background: #d1fae5;
  color: #065f46;
}
.pc-card__type--studio {
  background: #ede9fe;
  color: #5b21b6;
}
.pc-card__type--pg {
  background: #fce7f3;
  color: #9d174d;
}
.pc-card__type--pg_hostel {
  background: #fce7f3;
  color: #9d174d;
}
.pc-card__type--independent_floor {
  background: #e0e7ff;
  color: #3730a3;
}
.pc-card__type--penthouse {
  background: #fef9c3;
  color: #854d0e;
}

/* Location */
.pc-card__location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6b7280;
  font-size: 13px;
}

.pc-card__location svg {
  flex-shrink: 0;
  color: #3b82f6;
}

/* Stats Row */
.pc-card__stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.pc-card__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.pc-card__stat:not(:last-child) {
  border-right: 1px solid #f0f0f0;
}

.pc-card__stat svg {
  color: #6b7280;
}

.pc-card__stat span {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

/* Tags */
.pc-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pc-card__tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}

.pc-card__tag--neutral {
  background: #f3f4f6;
  color: #4b5563;
}

.pc-card__tag--green {
  background: #ecfdf5;
  color: #059669;
}

/* Footer */
.pc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.pc-card__owner {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}

.pc-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.pc-card__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 700;
}

.pc-card__owner-info {
  display: flex;
  flex-direction: column;
}

.pc-card__owner-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-card__owner-role {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-card__time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #9ca3af;
}

.pc-card__time svg {
  color: #9ca3af;
}

/* Grid Layout for Cards */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 991px) {
  .pc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Mobile 2-column grid adjustments */
@media (max-width: 575px) {
  .pc-card__title {
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }
  .pc-card__price {
    font-size: 1rem;
  }
  .pc-card__deposit {
    font-size: 0.65rem;
  }
  .pc-card__location span {
    font-size: 0.72rem;
  }
  .pc-card__stats {
    gap: 6px;
  }
  .pc-card__stat {
    font-size: 0.7rem;
    gap: 3px;
  }
  .pc-card__stat svg {
    width: 12px;
    height: 12px;
  }
  .pc-card__footer {
    padding: 8px 10px;
  }
  .pc-card__avatar {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }
  .pc-card__owner-name {
    font-size: 0.7rem;
  }
  .pc-card__owner-role {
    font-size: 0.65rem;
  }
  .pc-card__time {
    font-size: 0.65rem;
  }
  .pc-card__type {
    font-size: 0.6rem;
    padding: 1px 5px;
  }
  .pc-card__badge {
    font-size: 0.5rem;
    padding: 1px 4px;
    border-radius: 3px;
  }
  .pc-card__content {
    padding: 8px;
    gap: 4px;
  }
  .pc-card__save-btn {
    width: 28px;
    height: 28px;
  }
}
  
  .pc-card__price {
    font-size: 18px;
  }
  
  .pc-card__title {
    font-size: 14px;
  }
}

/* Dark mode support */

/* Price tags (transaction type for sale) */
.pc-card__price-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 4px;
}

.pc-card__verified {
  margin-left: 2px;
  flex-shrink: 0;
}

.pc-card__badge--verified {
  background: #0a7ea4;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: auto;
}

/* ===== Mobile 2-Column Grid Card Scaling ===== */
@media (max-width: 767px) {
  .pc-card {
    border-radius: 10px;
  }
  .pc-card__image {
    height: 120px;
  }
  .pc-card__badge {
    font-size: 0.55rem;
    padding: 2px 5px;
    top: 6px;
    left: 6px;
  }
  .pc-card__save {
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
  }
  .pc-card__save svg {
    width: 14px;
    height: 14px;
  }
  .pc-card__body {
    padding: 6px;
  }
  .pc-card__content {
    gap: 3px;
    padding: 6px;
  }
  .pc-card__price-row {
    margin-bottom: 2px;
  }
  .pc-card__price {
    font-size: 0.85rem;
  }
  .pc-card__price-period {
    font-size: 0.6rem;
  }
  .pc-card__deposit {
    font-size: 0.6rem;
  }
  .pc-card__title {
    font-size: 0.72rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }
  .pc-card__type {
    font-size: 0.55rem;
    padding: 1px 4px;
  }
  .pc-card__location {
    font-size: 0.62rem;
    gap: 3px;
  }
  .pc-card__location svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
  }
  .pc-card__stats {
    padding: 4px 6px;
    gap: 2px;
  }
  .pc-card__stat {
    font-size: 0.5rem;
    gap: 1px;
  }
  .pc-card__stat svg {
    width: 10px;
    height: 10px;
  }
  .pc-card__stat span {
    font-size: 0.55rem !important;
  }
  .pc-card__footer {
    padding: 6px 8px;
  }
  .pc-card__avatar {
    width: 20px;
    height: 20px;
    font-size: 0.55rem;
  }
  .pc-card__owner {
    gap: 4px;
  }
  .pc-card__owner-name {
    font-size: 0.6rem;
  }
  .pc-card__owner-role {
    font-size: 0.55rem;
  }
  .pc-card__time {
    font-size: 0.55rem;
    gap: 2px;
  }
  .pc-card__time svg {
    width: 10px;
    height: 10px;
  }
  .pc-card__wishlist {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
  }
  .pc-card__wishlist i {
    font-size: 12px;
  }
}

/* Property Type Badge - Top Right Corner */
.pc-card__type-badge {
    position: absolute;
    top: 8px;
    right: 44px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.pc-card__type-badge--house { background: rgba(59, 130, 246, 0.9); color: white; }
.pc-card__type-badge--apartment { background: rgba(139, 92, 246, 0.9); color: white; }
.pc-card__type-badge--villa { background: rgba(16, 185, 129, 0.9); color: white; }
.pc-card__type-badge--pg { background: rgba(245, 158, 11, 0.9); color: white; }
.pc-card__type-badge--flat { background: rgba(99, 102, 241, 0.9); color: white; }
.pc-card__type-badge--studio { background: rgba(236, 72, 153, 0.9); color: white; }
.pc-card__type-badge--room { background: rgba(14, 165, 233, 0.9); color: white; }

/* Grid wrapper height fix for consistent card heights */
.property-card-wrapper {
  display: flex;
  flex-direction: column;
}
.grid-card-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.grid-card-view .pc-card {
  flex: 1;
}
