.property-card {
  position: relative;
}

.property-card-media {
  position: relative;
}

.property-card-image-link {
  display: block;
}

.property-card-image-link img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.property-card--horizontal {
  display: flex;
  align-items: stretch;
}

.property-card--horizontal .card-content {
  flex: 1;
  min-width: 0;
}

.property-card--horizontal .property-card-actions {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 2px 0 6px;
}

.property-card--grid {
  display: flex;
  flex-direction: column;
}

.property-card--grid .property-card-actions {
  align-self: flex-end;
  margin-top: auto;
  padding: 0 12px 12px;
}

/* Card Compass (listing sidebar + mappa) */
.property-card--compass {
  display: flex;
  flex-direction: column;
  position: relative;
}

.property-card--compass .property-card-media {
  position: relative;
}

.property-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0d7377;
  color: #fff;
  pointer-events: none;
}

.property-card-hide-media {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
}

.property-card-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  padding: 0;
  line-height: 0;
}

.property-card--compass:hover .property-card-nav,
.property-card--compass:focus-within .property-card-nav {
  opacity: 1;
}

.property-card-nav--prev {
  left: 10px;
}

.property-card-nav--next {
  right: 10px;
}

.property-card-nav::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2px solid #2e5d63;
  border-bottom: 2px solid #2e5d63;
  margin: 0;
  flex-shrink: 0;
}

.property-card-nav--prev::before {
  transform: translateX(1px) rotate(135deg);
}

.property-card-nav--next::before {
  transform: translateX(-1px) rotate(-45deg);
}

.property-card-counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  pointer-events: none;
}

.property-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.property-card-actions {
  position: static;
  z-index: 5;
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.property-action-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.property-action-btn:hover {
  transform: scale(1.05);
  background: #fff;
}

.property-action-btn.is-active.property-action-favorite {
  background: #ffe9ec;
}

.property-action-btn.is-active.property-action-favorite .property-action-icon {
  color: #e11d48;
}

.property-action-btn.is-active.property-action-hide {
  background: #eef2f3;
}

.property-action-icon {
  font-size: 18px;
  line-height: 1;
  color: #2e5d63;
}

.property-action-btn.is-active.property-action-favorite .property-action-icon::before {
  content: '♥';
}

.property-action-favorite.is-active .property-action-icon {
  font-size: 0;
}

.property-action-favorite.is-active .property-action-icon::before {
  content: '♥';
  font-size: 18px;
  color: #e11d48;
}

.property-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.property-detail-actions .property-action-btn {
  width: 42px;
  height: 42px;
}

.property-restore-btn {
  margin-top: 12px;
  border: 1px solid #2e5d63;
  background: #fff;
  color: #2e5d63;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.property-restore-btn:hover {
  background: #f1f7f9;
}

.save-search-btn,
.buyer-area-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid #1a4a4d;
  background: #fff;
  color: #1a4a4d;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.save-search-btn:hover,
.buyer-area-link-btn:hover {
  background: #f4fbfb;
}

.listing-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
  flex-wrap: wrap;
}

.listing-pagination a,
.listing-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #1a4a4d;
  border: 1px solid #c5e0e2;
  font-weight: 600;
}

.listing-pagination a:hover {
  background: #f1f7f9;
}

.listing-pagination .is-current {
  background: #2e5d63;
  color: #fff;
  border-color: #2e5d63;
}

.listing-results-meta {
  margin: 0 0 16px;
  color: #5a7a7c;
  font-size: 0.95rem;
}

.buyer-search-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.buyer-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d7e7ea;
  border-radius: 12px;
  background: #fff;
}

.buyer-search-item h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #1a4a4d;
}

.buyer-search-item p {
  margin: 0;
  color: #5a7a7c;
  font-size: 0.9rem;
}

.buyer-search-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.buyer-search-actions a,
.buyer-search-actions button {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.buyer-search-actions .run-search {
  background: #ece819;
  color: #1a4a4d;
}

.buyer-search-actions .delete-search {
  background: #f4f4f4;
  color: #8b1e12;
}

.dashboard-buyer-section {
  margin-top: 48px;
}

.dashboard-buyer-section h2 {
  margin-bottom: 8px;
  font-size: 1.6rem;
  font-weight: 300;
  color: #0d7377;
}

.dashboard-buyer-section p {
  margin-bottom: 20px;
  color: #5a7a7c;
}

@media (max-width: 768px) {
  .buyer-search-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .buyer-search-actions {
    width: 100%;
  }

  .buyer-search-actions a,
  .buyer-search-actions button {
    flex: 1;
    text-align: center;
  }
}
