/* Area acquirente — preferiti, nascosti, ricerche salvate */

.buyer-page {
  background: linear-gradient(180deg, #e8f4f5 0%, #f4fafb 220px, #e8f4f5 100%);
  min-height: calc(100vh - 80px);
}

.buyer-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 28px;
  padding: 36px 32px;
  border-radius: 0px;
  background: linear-gradient(135deg, #2e5d63 0%, #3cb4b8 55%, #66d2df 100%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(46, 93, 99, 0.22);
}

.buyer-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(247, 231, 51, 0.2);
  filter: blur(2px);
}

.buyer-hero--hidden {
  background: linear-gradient(135deg, #3a4a4d 0%, #2e5d63 60%, #4a7a80 100%);
}

.buyer-hero--searches {
  background: linear-gradient(135deg, #1f6b70 0%, #2e8f96 50%, #3cb4b8 100%);
}

.buyer-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.buyer-hero__title {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 300;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.buyer-hero__title strong {
  font-weight: 800;
}

.buyer-hero__subtitle {
  margin: 0;
  max-width: 620px;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.92;
  position: relative;
  z-index: 1;
}

.buyer-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.buyer-hero__stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-weight: 600;
  font-size: 0.9rem;
}

.buyer-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.buyer-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #f7e733;
  color: #1a4a4d;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.buyer-hero__cta--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Lista card orizzontali — allineata a /immobili e /immobili-mappa */
.buyer-properties-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.buyer-properties-list .property-card--horizontal {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e8f2f3;
  background: #fff;
  box-shadow: 0 4px 16px rgba(26, 74, 77, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: buyerCardIn 0.4s ease both;
}

.buyer-properties-list .property-card--horizontal:nth-child(2) { animation-delay: 0.04s; }
.buyer-properties-list .property-card--horizontal:nth-child(3) { animation-delay: 0.08s; }
.buyer-properties-list .property-card--horizontal:nth-child(4) { animation-delay: 0.12s; }

.buyer-properties-list .property-card--horizontal:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(26, 74, 77, 0.12);
}

.buyer-properties-list .property-card-media {
  flex: 0 0 140px;
  min-width: 140px;
  overflow: hidden;
  border-radius: 10px;
}

.buyer-properties-list .property-card-image-link {
  display: block;
  height: 100%;
  min-height: 96px;
}

.buyer-properties-list .property-card-image-link img {
  width: 140px;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
  margin: 0;
}

.buyer-properties-list .card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
}

.buyer-properties-list .city {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3cb4b8;
}

.buyer-properties-list .title a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a4a4d;
  text-decoration: none;
  line-height: 1.35;
}

.buyer-properties-list .meta {
  font-size: 0.82rem;
  color: #5a7a7c;
}

.buyer-properties-list .price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0d7377;
}

.buyer-properties-list .property-card-actions {
  padding: 0 4px 0 8px;
}

@media (max-width: 640px) {
  .buyer-properties-list .property-card-media {
    flex: 0 0 110px;
    min-width: 110px;
  }

  .buyer-properties-list .property-card-image-link img {
    width: 110px;
  }
}

/* Grid card immobili in area utente (legacy, ancora usabile) */
.buyer-properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.buyer-properties-grid .property-card {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(13, 115, 119, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: buyerCardIn 0.45s ease both;
}

.buyer-properties-grid .property-card:nth-child(2) { animation-delay: 0.05s; }
.buyer-properties-grid .property-card:nth-child(3) { animation-delay: 0.1s; }
.buyer-properties-grid .property-card:nth-child(4) { animation-delay: 0.15s; }

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

.buyer-properties-grid .property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(13, 115, 119, 0.16);
  background: #fff;
}

.buyer-properties-grid .property-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.buyer-properties-grid .property-card-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.buyer-properties-grid .card-content {
  padding: 16px 18px 18px;
}

.buyer-properties-grid .city {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3cb4b8;
  margin-bottom: 6px;
}

.buyer-properties-grid .title a {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a4a4d;
  line-height: 1.35;
}

.buyer-properties-grid .meta {
  margin-top: 8px;
  color: #5a7a7c;
  font-size: 0.88rem;
}

.buyer-properties-grid .price {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #2e5d63;
}

/* Ricerche salvate — card WOW */
.buyer-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.buyer-search-card {
  position: relative;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(197, 224, 226, 0.9);
  box-shadow: 0 12px 32px rgba(13, 115, 119, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: buyerCardIn 0.4s ease both;
}

.buyer-search-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(13, 115, 119, 0.14);
}

.buyer-search-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f7f8, #d4f0f2);
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.buyer-search-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #1a4a4d;
}

.buyer-search-card__summary {
  margin: 0 0 12px;
  color: #5a7a7c;
  font-size: 0.92rem;
  line-height: 1.5;
}

.buyer-search-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.buyer-search-chip-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f9fa;
  color: #2e5d63;
  font-size: 0.75rem;
  font-weight: 600;
}

.buyer-search-card__date {
  margin: 0 0 16px;
  font-size: 0.8rem;
  color: #8aa5a8;
}

.buyer-search-card__actions {
  display: flex;
  gap: 8px;
}

.buyer-search-card__actions .run-search {
  flex: 1;
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7e733, #ece819);
  color: #1a4a4d;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(236, 232, 25, 0.3);
}

.buyer-search-card__actions .delete-search {
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: #f6f0f0;
  color: #8b1e12;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Empty state */
.buyer-empty {
  text-align: center;
  padding: 48px 28px;
  border-radius: 20px;
  background: #fff;
  border: 1px dashed #c5e0e2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.buyer-empty__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #e8f7f8, #fff);
  box-shadow: 0 8px 24px rgba(60, 180, 184, 0.15);
}

.buyer-empty h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  color: #1a4a4d;
}

.buyer-empty p {
  margin: 0 auto 20px;
  max-width: 420px;
  color: #5a7a7c;
  line-height: 1.55;
}

.buyer-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #2e5d63;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

/* Newsletter + toggle avvisi ricerche */
.buyer-newsletter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f7f8 0%, #fff 60%);
  border: 1px solid rgba(197, 224, 226, 0.95);
  box-shadow: 0 10px 28px rgba(13, 115, 119, 0.08);
}

.buyer-newsletter-card__copy h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #1a4a4d;
}

.buyer-newsletter-card__copy p {
  margin: 0;
  font-size: 0.9rem;
  color: #5a7a7c;
  line-height: 1.45;
  max-width: 520px;
}

.buyer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.buyer-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.buyer-toggle__ui {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #c9d9db;
  position: relative;
  transition: background 0.2s ease;
  border: 1px solid rgba(46, 93, 99, 0.15);
}

.buyer-toggle__ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.buyer-toggle input:checked + .buyer-toggle__ui {
  background: linear-gradient(135deg, #3cb4b8, #2e9a9e);
}

.buyer-toggle input:checked + .buyer-toggle__ui::after {
  transform: translateX(20px);
}

.buyer-toggle__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2e5d63;
  min-width: 58px;
}

.buyer-search-notify {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #2e5d63;
  font-weight: 600;
  cursor: pointer;
}

.buyer-search-notify input {
  width: 16px;
  height: 16px;
  accent-color: #3cb4b8;
}

@media (max-width: 768px) {
  .buyer-hero {
    padding: 28px 22px;
    border-radius: 16px;
  }

  .buyer-search-grid {
    grid-template-columns: 1fr;
  }

  .buyer-newsletter-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Modalità classica area acquirente */
body.theme-classic .buyer-hero {
  background: #1f2937;
}

body.theme-classic .buyer-hero__cta {
  background: #f3f4f6;
  color: #111827;
}

body.theme-classic .buyer-newsletter-card {
  background: #fff;
}
