/* ============================================================
 * RLP Property Sections - Frontend Styles
 * For use with Houzez child theme
 * ============================================================ */

.rlp-property-section {
  --rlp-accent: #e63946;
  --rlp-text: #1a1a1a;
  --rlp-text-muted: #6b7280;
  --rlp-border: #e5e7eb;
  --rlp-bg: #ffffff;
  --rlp-bg-subtle: #f8f9fa;
  --rlp-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --rlp-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
  --rlp-radius: 10px;

  padding: 64px 0;
  background: var(--rlp-bg);
  box-sizing: border-box;
}

.rlp-property-section *,
.rlp-property-section *::before,
.rlp-property-section *::after {
  box-sizing: border-box;
}

/* Subtle alternating background for "Hot Deals" section */
.rlp-section-hot_deals {
  background: var(--rlp-bg-subtle);
}

.rlp-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Section header ---------- */
.rlp-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.rlp-section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--rlp-text);
  display: inline-block;
  line-height: 1.2;
}

.rlp-section-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: var(--rlp-accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.rlp-section-subtitle {
  font-size: 1rem;
  color: var(--rlp-text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Grid ---------- */
.rlp-grid {
  display: grid;
  gap: 26px;
}

.rlp-grid.rlp-cols-1 {
  grid-template-columns: 1fr;
}
.rlp-grid.rlp-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.rlp-grid.rlp-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.rlp-grid.rlp-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .rlp-grid.rlp-cols-3,
  .rlp-grid.rlp-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rlp-property-section {
    padding: 40px 0;
  }
  .rlp-grid.rlp-cols-2,
  .rlp-grid.rlp-cols-3,
  .rlp-grid.rlp-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Card ---------- */
.rlp-card {
  background: #fff;
  border-radius: var(--rlp-radius);
  overflow: hidden;
  box-shadow: var(--rlp-shadow);
  border: 1px solid var(--rlp-border);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.rlp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rlp-shadow-hover);
}

/* ---------- Card media ---------- */
.rlp-card-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--rlp-bg-subtle);
  text-decoration: none;
}

.rlp-card-media .rlp-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.rlp-card:hover .rlp-card-img {
  transform: scale(1.06);
}

.rlp-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}

/* ---------- Badges on media ---------- */
.rlp-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--rlp-accent);
  color: #fff;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  line-height: 1.4;
}

.rlp-card-discount {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #111;
  color: #fff;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1.4;
}

.rlp-card-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--rlp-text);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ---------- Card body ---------- */
.rlp-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.rlp-card-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--rlp-accent);
  text-transform: uppercase;
}

.rlp-card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin: 0;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.rlp-card-title a {
  color: var(--rlp-text);
  text-decoration: none;
  transition: color 0.2s;
}

.rlp-card-title a:hover {
  color: var(--rlp-accent);
}

.rlp-card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--rlp-text-muted);
  line-height: 1.4;
}

.rlp-card-location svg {
  color: var(--rlp-accent);
  flex-shrink: 0;
}

/* ---------- Price ---------- */
.rlp-card-price-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--rlp-border);
  border-bottom: 1px solid var(--rlp-border);
}

.rlp-card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rlp-accent);
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.rlp-price-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rlp-accent);
}

.rlp-spec-label {
  font-size: 11px;
  color: var(--rlp-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rlp-card-price-old {
  font-size: 0.95rem;
  color: var(--rlp-text-muted);
  text-decoration: line-through;
}

.rlp-card-sec-price {
  font-size: 0.8rem;
  color: var(--rlp-text-muted);
  width: 100%;
}

.rlp-price-prefix,
.rlp-price-postfix {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--rlp-text-muted);
}

.rlp-price-poa {
  font-size: 1rem;
  color: var(--rlp-text-muted);
  font-weight: 600;
}

/* ---------- Specs ---------- */
.rlp-card-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--rlp-text);
}

.rlp-card-specs li {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rlp-card-specs svg {
  color: var(--rlp-text-muted);
  flex-shrink: 0;
}

/* ---------- Promo countdown ---------- */
.rlp-card-timer {
  font-size: 12px;
  background: #fff4e6;
  color: #c2410c;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
}

/* ---------- CTA ---------- */
.rlp-card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  background: transparent;
  color: var(--rlp-accent);
  border: 1.5px solid var(--rlp-accent);
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rlp-card-cta:hover {
  background: var(--rlp-accent);
  color: #fff;
}

/* ---------- Section footer ---------- */
.rlp-section-footer {
  text-align: center;
  margin-top: 40px;
}

.rlp-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--rlp-accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.rlp-view-all-btn:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  color: #fff;
}
