/* ===================================
   HOME - NEARBY (géolocalisation + slider)
   Fichier: assets/css/home-nearby.css
   =================================== */

/* Section */
.nearby {
  padding: 70px 0;
  background: #fff;
}

.nearby-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.nearby-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
  margin: 0;
}

.nearby-subtitle {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 1.05rem;
}

/* Nav buttons */
.nearby-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nearby-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.nearby-nav-btn ion-icon {
  font-size: 18px;
}

.nearby-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
}

.nearby-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
}

/* Status pill */
.nearby-status {
  margin: 10px 0 16px;
}

.nearby-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
  font-weight: 700;
  font-size: 0.95rem;
}

.nearby-pill ion-icon {
  font-size: 18px;
  opacity: 0.9;
}

/* Viewport + track */
.nearby-viewport {
  overflow: hidden;
  border-radius: 18px;
}

.nearby-track {
  display: flex;
  gap: 18px;
  will-change: transform;
  transition: transform 0.35s ease;
  padding: 2px;
}

/* Card */
.nearby-card {
  flex: 0 0 calc((100% - 36px) / 3); /* 3 cards on desktop (gap 18px -> 2 gaps = 36px) */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nearby-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.10);
}

/* Image */
.nearby-card-imgwrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #f3f4f6;
}

.nearby-card-imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nearby-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(6px);
}

.nearby-badge.sale {
  color: #0f172a;
}

/* Body */
.nearby-card-body {
  padding: 14px 14px 12px;
}

.nearby-price {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #111827;
}

.nearby-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.95rem;
}

.nearby-location ion-icon {
  font-size: 16px;
  opacity: 0.9;
}

.nearby-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  color: #111827;
  font-size: 0.92rem;
}

.nearby-meta span {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  color: #111827;
}

.nearby-meta strong {
  font-weight: 900;
}

/* Actions row */
.nearby-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.nearby-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  color: #ff6b00;
  text-decoration: none;
}

.nearby-actions a ion-icon {
  font-size: 16px;
}

.nearby-icons {
  display: flex;
  gap: 8px;
}

.nearby-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nearby-icon-btn ion-icon {
  font-size: 18px;
}

.nearby-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

/* Dots */
.nearby-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.nearby-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #e5e7eb;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.nearby-dot.is-active {
  background: #111827;
  border-color: #111827;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 980px) {
  .nearby-card {
    flex: 0 0 calc((100% - 18px) / 2); /* 2 cards */
  }
  .nearby-title { font-size: 1.9rem; }
}

@media (max-width: 620px) {
  .nearby-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .nearby-nav {
    width: 100%;
    justify-content: flex-start;
  }
  .nearby-card {
    flex: 0 0 100%; /* 1 card */
  }
  .nearby-card-imgwrap {
    height: 190px;
  }
}
