/* ============================================
   RV — Card Grid & Cards
   Minimalist catalog, emerald & coral
   ============================================ */

.rv-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .rv-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .rv-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@media (min-width: 1200px) {
  .rv-cards-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* --- Card --- */
.rv-card {
  display: flex;
  flex-direction: column;
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
}

.rv-card:hover {
  box-shadow: var(--rv-shadow-medium);
  transform: scale(1.02);
}

/* --- Photo --- */
.rv-card__photo-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.rv-card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #E8F5F0 0%, #F7F8FA 100%);
}

.rv-card__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rv-card:hover .rv-card__photo-img { transform: scale(1.03); }

.rv-card__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rv-border-hover);
}

.rv-card__photo-placeholder svg { width: 40px; height: 40px; }

/* --- Badges (top-left on photo) --- */
.rv-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.rv-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--rv-radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.rv-card__badge--verified { background: var(--rv-primary); }
.rv-card__badge--online { background: var(--rv-accent); }
.rv-card__badge svg { width: 10px; height: 10px; }

/* --- Overlay actions (top-right on photo) --- */
.rv-card__actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.rv-card__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  color: var(--rv-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.rv-card__action-btn:hover { background: #fff; color: var(--rv-primary); }
.rv-card__action-btn svg { width: 16px; height: 16px; }

/* --- Price badge (bottom-right on photo) --- */
.rv-card__price {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 10px;
  background: var(--rv-accent);
  border-radius: var(--rv-radius-sm);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  z-index: 2;
}

@media (min-width: 768px) {
  .rv-card__price { font-size: 0.875rem; padding: 5px 12px; }
}

/* --- Photo count badge --- */
.rv-card__photo-count {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--rv-radius-sm);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
}

.rv-card__photo-count svg { width: 12px; height: 12px; }

/* --- Body --- */
.rv-card__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  flex: 1;
}

@media (min-width: 768px) {
  .rv-card__content { padding: 12px 14px; gap: 8px; }
}

/* --- Card Header (name + age) --- */
.rv-card__header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.rv-card__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--rv-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rv-card__age {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--rv-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Location --- */
.rv-card__location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--rv-muted);
  margin-bottom: 2px;
}

.rv-card__location svg {
  width: 12px;
  height: 12px;
}

.rv-card__location-link {
  color: var(--rv-primary);
  text-decoration: none;
  font-weight: 500;
}

.rv-card__location-link:hover {
  text-decoration: underline;
}

/* --- Params (chips as links) --- */
.rv-card__params {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rv-card__param {
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 500;
  background: var(--rv-bg);
  color: var(--rv-body);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-sm);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: inline-block;
}

.rv-card__param--link:hover {
  background: var(--rv-primary-light);
  color: var(--rv-primary);
  border-color: var(--rv-primary);
}

@media (min-width: 768px) { .rv-card__param { font-size: 0.75rem; padding: 3px 10px; } }

/* --- Place chips (Апартаменты / Выезд) --- */
.rv-card__place-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.rv-card__place-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  background: var(--rv-primary-light);
  color: var(--rv-primary);
  white-space: nowrap;
  font-weight: 500;
}

.rv-card__place-chip svg { width: 12px; height: 12px; }

/* --- Description --- */
.rv-card__desc {
  font-size: 0.75rem;
  color: var(--rv-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) { .rv-card__desc { font-size: 0.8125rem; } }

/* --- Contacts (phone + messengers inline) --- */
.rv-card__contacts {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.rv-card__contacts .rv-card__messengers {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

/* --- Actions (phone / detail button) --- */
.rv-card__actions-bottom {
  margin-top: auto;
  padding-top: 6px;
}

.rv-card__phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  background: var(--rv-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--rv-radius-md);
  text-decoration: none;
  transition: background 0.15s;
}

.rv-card__phone-btn:hover { background: var(--rv-primary-hover); }

.rv-card__phone-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.rv-card__detail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 10px;
  background: var(--rv-bg);
  color: var(--rv-body);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--rv-radius-md);
  text-decoration: none;
  border: 1px solid var(--rv-border);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rv-card__detail-btn:hover {
  background: var(--rv-primary-light);
  color: var(--rv-primary);
  border-color: var(--rv-primary);
}

/* --- Messengers --- */
.rv-card__messengers {
  display: flex;
  gap: 4px;
}

.rv-card__messenger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--rv-radius-sm);
  font-size: 10px;
  font-weight: 600;
  cursor: default;
}

.rv-card__messenger--tg { background: #e3f2fd; color: #0088cc; }
.rv-card__messenger--wa { background: #e8f5e9; color: #25d366; }
.rv-card__messenger--vb { background: #f3e5f5; color: #7360f2; }

/* ============================================
   Pagination
   ============================================ */
.rv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.rv-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rv-body);
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.rv-pagination__item:hover {
  background: var(--rv-primary-light);
  color: var(--rv-primary);
  border-color: var(--rv-primary);
}

.rv-pagination__item--active {
  background: var(--rv-primary);
  color: #fff;
  border-color: var(--rv-primary);
  box-shadow: var(--rv-shadow-heavy);
  pointer-events: none;
}

.rv-pagination__item--prev svg,
.rv-pagination__item--next svg {
  width: 18px;
  height: 18px;
}

.rv-pagination__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 40px;
  font-size: 0.875rem;
  color: var(--rv-muted);
  user-select: none;
}

@media (min-width: 768px) {
  .rv-pagination { margin-top: 36px; gap: 8px; }
  .rv-pagination__item { min-width: 44px; height: 44px; border-radius: var(--rv-radius-md); }
}
