/**
 * Rehome Theme — assets/css/components.css
 * Forms, modals, badges, alerts, pagination, compare bar, toast,
 * listing single detail, gallery, sidebar, seller card, archive layout.
 */

/* ============================================================
   FORMS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--rehome-text);
}

.form-label .required {
  color: var(--rehome-error);
  margin-left: 2px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--rehome-text-muted);
  margin-top: 2px;
}

.form-error-msg {
  font-size: var(--text-xs);
  color: var(--rehome-error);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--rehome-surface);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: var(--space-5) var(--space-5) 0;
}

.card-body {
  padding: var(--space-5);
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: all var(--transition-fast);
}

.badge svg {
  flex-shrink: 0;
}

.badge-featured   { background: rgba(24, 18, 10, 0.82); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); font-weight: 600; }
.badge-verified   { background: rgba(15, 23, 42, 0.8); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.3); }
.badge-available  { background: rgba(18, 32, 22, 0.82); color: #86efac; border: 1px solid rgba(134, 239, 172, 0.3); }
.badge-sold       { background: rgba(220, 38, 38, 0.92); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.04em; }
.badge-reserved   { background: rgba(217, 119, 6, 0.92); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.04em; }
.badge-expired    { background: rgba(55, 65, 81, 0.85); color: #d1d5db; border: 1px solid rgba(107, 114, 128, 0.4); }
.badge-primary    { background: rgba(221, 161, 94, 0.15); color: var(--rehome-primary); border: 1px solid rgba(221, 161, 94, 0.3); }
.badge-neutral    { background: rgba(30, 35, 45, 0.8); color: var(--rehome-text-muted); border: 1px solid var(--rehome-border); }

/* ============================================================
   SECTION LAYOUT HELPERS
   ============================================================ */

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rehome-primary);
  margin-bottom: var(--space-2);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--rehome-text);
  line-height: 1.25;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--rehome-text-muted);
  margin-top: var(--space-3);
  max-width: 560px;
  line-height: 1.7;
}

.section-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--rehome-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.section-link:hover { color: var(--rehome-primary); }
.section-link svg { transition: transform var(--transition-fast); }
.section-link:hover svg { transform: translateX(3px); }

@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-title { font-size: var(--text-2xl); }
}

/* ============================================================
   MODAL
   ============================================================ */

.rehome-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
}

.rehome-modal.is-open { visibility: visible; }

.rehome-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 27, 24, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.rehome-modal.is-open .rehome-modal__overlay { opacity: 1; }

.rehome-modal__box {
  position: relative;
  background: var(--rehome-surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--rehome-border);
  width: min(500px, calc(100vw - 32px));
  max-height: min(90vh, 700px);
  overflow-y: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.rehome-modal.is-open .rehome-modal__box {
  transform: translateY(0);
  opacity: 1;
}

.rehome-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--rehome-border);
  position: sticky;
  top: 0;
  background: var(--rehome-surface);
  z-index: 1;
}

.rehome-modal__header h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

.rehome-modal__body {
  padding: var(--space-6);
}

/* ============================================================
   ALERT BOXES
   ============================================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
}

.alert svg { flex-shrink: 0; margin-top: 2px; }

.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #14532d; }
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #7f1d1d; }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #713f12; }
.alert-info    { background: var(--rehome-primary-soft); border: 1px solid var(--rehome-primary); color: var(--rehome-dark); }

/* ============================================================
   PAGINATION
   ============================================================ */

.rehome-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}

.rehome-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--rehome-border);
  color: var(--rehome-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--transition-fast);
}

.rehome-pagination .page-numbers:hover {
  border-color: var(--rehome-primary);
  color: var(--rehome-primary);
  background: var(--rehome-primary-soft);
}

.rehome-pagination .current {
  background: var(--rehome-primary);
  border-color: var(--rehome-primary);
  color: var(--rehome-dark);
  font-weight: var(--weight-bold);
}

.rehome-pagination .dots {
  border: none;
  background: none;
  color: var(--rehome-text-subtle);
}

/* ============================================================
   LISTING SINGLE — Full page layout
   ============================================================ */

.listing-single {
  padding: var(--space-8) 0 var(--space-20);
}

.listing-single__layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 1100px) {
  .listing-single__layout {
    grid-template-columns: 1fr;
  }

  .listing-single__sidebar {
    display: contents; /* Sidebar items flow into main */
  }
}

/* ── Gallery ─────────────────────────────────────────────── */

.listing-gallery {
  margin-bottom: var(--space-8);
}

.listing-gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--rehome-surface-elevated);
  cursor: pointer;
}

.listing-gallery__main-link {
  display: block;
  width: 100%;
  height: 100%;
}

.listing-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.listing-gallery__main:hover .listing-gallery__main-img {
  transform: scale(1.02);
}

.listing-gallery__expand-icon {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.listing-gallery__main:hover .listing-gallery__expand-icon { opacity: 1; }

.listing-gallery__counter {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-gallery__thumbs {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
}

.listing-gallery__thumbs::-webkit-scrollbar { display: none; }

.listing-gallery__thumb {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  border: 2.5px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--rehome-surface-elevated);
  transition: border-color var(--transition-fast);
}

.listing-gallery__thumb.is-active {
  border-color: var(--rehome-primary);
}

.listing-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.listing-gallery__thumb:hover img { transform: scale(1.06); }

.listing-gallery__placeholder {
  aspect-ratio: 4 / 3;
  background: var(--rehome-surface-elevated);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--rehome-text-subtle);
}

.listing-video {
  margin-top: var(--space-6);
}

.listing-video__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text-muted);
  margin-bottom: var(--space-3);
}

.listing-video iframe {
  width: 100%;
  border-radius: var(--radius-xl);
  aspect-ratio: 16 / 9;
}

/* ── SOLD / Reserved Banners ─────────────────────────────── */

.listing-sold-banner,
.listing-reserved-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
}

.listing-sold-banner {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #7f1d1d;
}

[data-theme="dark"] .listing-sold-banner {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

.listing-reserved-banner {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  color: #713f12;
}

[data-theme="dark"] .listing-reserved-banner {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.3);
  color: #fcd34d;
}

.listing-sold-banner__icon,
.listing-reserved-banner span:first-child {
  font-size: 24px;
  flex-shrink: 0;
}

.listing-sold-banner strong,
.listing-reserved-banner strong {
  display: block;
  font-weight: var(--weight-semibold);
  margin-bottom: 4px;
}

/* ── Listing header ──────────────────────────────────────── */

.listing-header {
  margin-bottom: var(--space-8);
}

.listing-header__badges {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.listing-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--rehome-text);
  line-height: 1.25;
  margin-bottom: var(--space-5);
}

.listing-price-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.listing-price {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--rehome-text);
}

.listing-price--sold {
  font-size: var(--text-2xl);
  color: var(--rehome-error);
}

.listing-price--request {
  font-size: var(--text-2xl);
  color: var(--rehome-text-muted);
}

.listing-price__negotiable {
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--rehome-text-muted);
  font-family: var(--font-ui);
}

.listing-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-left: auto;
}

.listing-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.listing-meta-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--rehome-text-muted);
  background: var(--rehome-surface-elevated);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--rehome-border);
}

/* ── Section titles ──────────────────────────────────────── */

.listing-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--rehome-text);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--rehome-border);
}

/* ── Description ─────────────────────────────────────────── */

.listing-description {
  margin-bottom: var(--space-8);
}

.listing-description__content {
  font-size: var(--text-base);
  color: var(--rehome-text-muted);
  line-height: 1.8;
}

/* ── Map section ─────────────────────────────────────────── */

.listing-map-section {
  margin-bottom: var(--space-8);
}

.listing-map {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--rehome-border);
  background: var(--rehome-surface-elevated);
}

.listing-map-notice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--rehome-text-subtle);
  margin-bottom: var(--space-3);
}

/* ── Contact card & Sidebar Layout ───────────────────────── */

.listing-single__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.listing-contact-card {
  margin-bottom: 0;
  background: var(--rehome-surface);
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.listing-contact-card .card-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--rehome-border);
}

.listing-contact-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin: 0;
}

.listing-contact-secondary {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.listing-contact-secondary .btn {
  flex: 1;
  justify-content: center;
}

/* ── Inquiry form ────────────────────────────────────────── */

.listing-inquiry {
  border-top: 1px solid var(--rehome-border);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
}

.listing-inquiry__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin-bottom: var(--space-4);
}

.listing-inquiry__form .form-group {
  margin-bottom: var(--space-4);
}

.listing-inquiry__form .form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin-bottom: var(--space-1);
}

.listing-inquiry__form .form-input,
.listing-inquiry__form .form-textarea {
  font-size: var(--text-sm);
  background: var(--rehome-surface);
  border: 1.5px solid var(--rehome-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.listing-inquiry__form .form-textarea {
  min-height: 90px;
  line-height: 1.5;
  resize: vertical;
}

#inquiry-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 15px;
  padding: 13px var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(221, 161, 94, 0.35);
  cursor: pointer;
  width: 100%;
}

#inquiry-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(221, 161, 94, 0.45);
}

#inquiry-submit svg {
  flex-shrink: 0;
}


/* ── WhatsApp button ─────────────────────────────────────── */

.btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border-color: #25D366 !important;
}

.btn-whatsapp:hover {
  background: #1da851 !important;
  border-color: #1da851 !important;
}

/* ── Seller card ─────────────────────────────────────────── */

.seller-card {
  margin-bottom: var(--space-5);
}

.seller-card__header {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.seller-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--rehome-border);
}

.seller-card__name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  text-decoration: none;
  margin-bottom: var(--space-2);
}

.seller-card__name:hover { color: var(--rehome-primary); }

.seller-card__since,
.seller-card__location {
  font-size: var(--text-xs);
  color: var(--rehome-text-subtle);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.seller-card__stats {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--rehome-border);
  border-bottom: 1px solid var(--rehome-border);
  margin-bottom: var(--space-4);
}

.seller-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.seller-stat__value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--rehome-text);
}

.seller-stat__label {
  font-size: var(--text-xs);
  color: var(--rehome-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Safety card ─────────────────────────────────────────── */

.listing-safety-tip__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
  color: var(--rehome-text);
}

.listing-safety-tip__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0;
  margin: 0;
}

.listing-safety-tip__list li {
  font-size: var(--text-sm);
  color: var(--rehome-text-muted);
  padding-left: var(--space-5);
  position: relative;
}

.listing-safety-tip__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--rehome-success);
  font-weight: bold;
}

/* ── Mobile contact bar ──────────────────────────────────── */

.mobile-contact-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--rehome-surface);
  border-top: 1px solid var(--rehome-border);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
  gap: var(--space-3);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

@media (max-width: 900px) {
  .mobile-contact-bar { display: flex; }

  .listing-single__layout {
    padding-bottom: 80px; /* clear mobile contact bar */
  }
}

/* ── Related listings ────────────────────────────────────── */

.related-listings {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--rehome-border);
}

/* ============================================================
   LISTING ARCHIVE LAYOUT
   ============================================================ */

.listings-hero {
  background: var(--rehome-surface-elevated);
  border-bottom: 1px solid var(--rehome-border);
  padding: var(--space-8) 0;
}

.listings-hero__inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.listings-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--rehome-text);
  margin-bottom: var(--space-2);
}

.listings-hero__desc {
  color: var(--rehome-text-muted);
  font-size: var(--text-base);
}

.listings-hero__cat-icon {
  font-size: 56px;
  line-height: 1;
  flex-shrink: 0;
}

.listing-search-form {
  background: var(--rehome-surface);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
}

.listing-search-form__inner {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.listing-search-form__keyword {
  flex: 2;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.listing-search-form__keyword svg {
  position: absolute;
  left: var(--space-4);
  color: var(--rehome-text-subtle);
  pointer-events: none;
}

.listing-search-form__keyword .form-input {
  padding-left: 44px;
  background: var(--rehome-surface-elevated);
  border-color: transparent;
}

.listing-search-form__inner .form-select {
  flex: 1;
  background: var(--rehome-surface-elevated);
  border-color: transparent;
}

@media (max-width: 768px) {
  .listing-search-form__inner {
    flex-direction: column;
  }
  .listing-search-form__keyword,
  .listing-search-form__inner .form-select { width: 100%; flex: none; }
}

/* Layout */
.listings-layout {
  padding-top: var(--space-8);
  padding-bottom: var(--space-20);
}

.listings-layout__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 1024px) {
  .listings-layout__inner {
    grid-template-columns: 1fr;
  }

  .listings-filters {
    display: none; /* Hidden — shown in drawer */
  }
}

/* Filter sidebar */
.listings-filters {
  background: var(--rehome-surface);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
  max-height: calc(100vh - var(--header-height) - var(--space-12));
  overflow-y: auto;
  scrollbar-width: thin;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--rehome-border);
}

.filters-header__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
}

.filter-group {
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--rehome-border);
  padding-bottom: var(--space-5);
}

.filter-group:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.filter-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--space-3);
  text-align: left;
  gap: var(--space-3);
}

.filter-group__toggle svg {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.filter-group__toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }

.filter-group__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-group__body.is-collapsed { display: none; }

.filter-check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--rehome-text-muted);
  transition: color var(--transition-fast);
}

.filter-check:hover { color: var(--rehome-text); }

.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--rehome-primary);
  flex-shrink: 0;
}

.filter-count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--rehome-text-subtle);
  background: var(--rehome-surface-elevated);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.price-range-sep {
  color: var(--rehome-text-subtle);
  flex-shrink: 0;
}

/* Toolbar */
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rehome-border);
  flex-wrap: wrap;
}

.listings-toolbar__count {
  font-size: var(--text-sm);
  color: var(--rehome-text-muted);
}

.listings-toolbar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.listings-sort {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.listings-sort__label {
  font-size: var(--text-sm);
  color: var(--rehome-text-muted);
  white-space: nowrap;
}

.view-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--rehome-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--rehome-text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  border-right: 1px solid var(--rehome-border);
}

.view-toggle__btn:last-child { border-right: none; }

.view-toggle__btn:hover,
.view-toggle__btn.is-active {
  background: var(--rehome-primary-soft);
  color: var(--rehome-primary);
}

/* Filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--rehome-primary-soft);
  color: var(--rehome-primary);
  border: 1px solid var(--rehome-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  background: var(--rehome-primary);
  color: var(--rehome-dark);
}

/* Empty state */
.listings-empty {
  text-align: center;
  padding: var(--space-20) var(--space-8);
}

.listings-empty__icon {
  width: 96px;
  height: 96px;
  background: var(--rehome-surface-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  color: var(--rehome-text-subtle);
}

.listings-empty__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin-bottom: var(--space-3);
}

.listings-empty__desc {
  color: var(--rehome-text-muted);
  margin-bottom: var(--space-8);
}

.listings-empty__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* List view */
.listing-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Mobile filter drawer */
.mobile-filter-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -100%;
  width: min(320px, 90vw);
  background: var(--rehome-surface);
  z-index: var(--z-modal);
  overflow-y: auto;
  transition: left var(--transition-slow);
  box-shadow: var(--shadow-xl);
}

.mobile-filter-drawer.is-open { left: 0; }

.mobile-filter-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--rehome-border);
  position: sticky;
  top: 0;
  background: var(--rehome-surface);
  z-index: 1;
}

.mobile-filter-drawer__body {
  padding: var(--space-5);
}

.mobile-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 27, 24, 0.5);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-filter-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   HOMEPAGE SECTIONS — EDITORIAL HERO & CENTERED LAYOUTS
   ============================================================ */

/* Hero — Fullwidth End-to-End */
.home-hero,
.home-hero--fullwidth,
.home-hero--editorial {
  position: relative;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: var(--space-10);
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(4.5rem, 8.5vw, 7.5rem);
  overflow: hidden;
}

/* Ensure Elementor Hero section & widget expand to full 100% width cleanly */
.elementor-section:has(.elementor-widget-rehome_hero),
.elementor-section.rehome-hero-fullwidth {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.elementor-section:has(.elementor-widget-rehome_hero) > .elementor-container,
.elementor-section.rehome-hero-fullwidth > .elementor-container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.elementor-section:has(.elementor-widget-rehome_hero) .elementor-column,
.elementor-section:has(.elementor-widget-rehome_hero) .elementor-widget-wrap {
  padding: 0 !important;
  margin: 0 !important;
}

.elementor-widget-rehome_hero {
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.elementor-widget-rehome_hero .home-hero {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.home-hero__card {
  position: relative;
  border-radius: 0;
  overflow: visible;
  border: none;
  box-shadow: none;
  padding: 0;
}

.home-hero__bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.home-hero__bg-img {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  object-fit: cover;
  object-position: center 40%;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  filter: blur(2.5px) brightness(0.94) contrast(1.02);
  transform: scale(1.04);
  transition: transform 0.8s ease-out;
}

.home-hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at center, rgba(18, 18, 16, 0.46) 0%, rgba(18, 18, 16, 0.68) 100%),
    linear-gradient(180deg, rgba(18, 18, 16, 0.38) 0%, rgba(18, 18, 16, 0.55) 50%, rgba(18, 18, 16, 0.76) 100%);
}

[data-theme="dark"] .home-hero__bg-overlay {
  background: 
    radial-gradient(ellipse at center, rgba(12, 12, 10, 0.55) 0%, rgba(12, 12, 10, 0.78) 100%),
    linear-gradient(180deg, rgba(12, 12, 10, 0.45) 0%, rgba(12, 12, 10, 0.68) 50%, rgba(12, 12, 10, 0.88) 100%);
}

.home-hero__inner {
  position: relative;
  z-index: 3;
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-4);
}

.home-hero__badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(22, 24, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #F4F3EE;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
}

.home-hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.18;
  margin: 0 auto var(--space-3);
  max-width: 900px;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.home-hero__headline-sub {
  display: block;
  color: #DDA15E;
  font-style: normal !important;
  font-weight: 700;
  margin-top: 4px;
}

.home-hero__desc {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(244, 243, 238, 0.9);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto var(--space-8);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.home-hero__search-wrap {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.home-hero .rehome-search-bar {
  background: var(--rehome-surface);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--rehome-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .home-hero .rehome-search-bar {
  background: #1F221B;
  border-color: #383E32;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.hero-popular-searches--centered {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-5);
}

.hero-popular-searches__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(244, 243, 238, 0.8);
}

.hero-popular-searches__tag {
  display: inline-flex;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: #F4F3EE;
  text-decoration: none;
  transition: all var(--transition-fast);
  background: rgba(22, 24, 20, 0.6);
  backdrop-filter: blur(6px);
}

.hero-popular-searches__tag:hover {
  border-color: var(--rehome-primary);
  color: #1A1C18;
  background: var(--rehome-primary);
}

/* ============================================================
   HOW REHOME WORKS (CENTER ALIGNED 4-STEP FLOW)
   ============================================================ */

.section-header--centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-10);
}

.section-header--centered .section-subtitle {
  max-width: 560px;
  margin: var(--space-2) auto 0;
  text-align: center;
}

.steps-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.steps-flow__track {
  display: none;
}

.step-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--rehome-surface);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: var(--rehome-border-strong);
  box-shadow: var(--shadow-sm);
}

.step-card__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rehome-surface-elevated);
  border: 1px solid var(--rehome-border);
  color: var(--rehome-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  flex-shrink: 0;
}

.step-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin-bottom: var(--space-1);
}

.step-card__desc {
  font-size: var(--text-xs);
  color: var(--rehome-text-muted);
  line-height: 1.55;
}

.how-it-works-action {
  text-align: center;
  margin-top: var(--space-8);
}

@media (max-width: 992px) {
  .steps-flow {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (max-width: 560px) {
  .steps-flow {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SELL YOUR ITEM CTA BANNER (WARM NATURAL SURFACE)
   ============================================================ */

.section--sell-banner {
  padding: var(--space-12) 0;
}

.sell-banner-card {
  background: var(--rehome-surface-elevated);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}

.sell-banner-card__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.sell-banner-badge {
  display: inline-block;
  background: var(--rehome-primary-soft);
  color: var(--rehome-primary);
  border: 1px solid var(--rehome-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-3);
}

.sell-banner-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 600;
  color: var(--rehome-text);
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.sell-banner-card__desc {
  font-size: var(--text-sm);
  color: var(--rehome-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-6);
}

.sell-banner-card__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.sell-banner-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--rehome-surface);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rehome-border);
}

.sell-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--rehome-text);
}

.sell-feature-check {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-xs);
  background: var(--rehome-success-soft);
  color: var(--rehome-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .sell-banner-card__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* Agent CTA */
.agent-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.agent-feature-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  background: var(--rehome-surface);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  transition: border-color var(--transition-fast);
}

.agent-feature-card:hover { border-color: var(--rehome-border-strong); }

.agent-feature-card__icon {
  width: 40px;
  height: 40px;
  background: var(--rehome-surface-elevated);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rehome-primary);
  flex-shrink: 0;
}

.agent-feature-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin-bottom: 2px;
}

.agent-feature-card__desc {
  font-size: var(--text-xs);
  color: var(--rehome-text-muted);
  line-height: 1.5;
}

/* Trust grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.trust-feature {
  text-align: center;
  padding: var(--space-5) var(--space-3);
}

.trust-feature__icon {
  width: 52px;
  height: 52px;
  background: var(--rehome-surface-elevated);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rehome-primary);
  margin: 0 auto var(--space-4);
}

.trust-feature__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--rehome-text);
  margin-bottom: var(--space-2);
}

.trust-feature__desc {
  font-size: var(--text-xs);
  color: var(--rehome-text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent-cta-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 560px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.sell-cta-feature {
  font-size: var(--text-base);
  color: #C9C5B9;
  margin: 0;
  line-height: 2;
}

/* Responsive fixes */
@media (max-width: 1024px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .agent-cta-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .trust-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .home-hero__stats { gap: var(--space-6); }
  .hero-stat__value { font-size: var(--text-2xl); }
  .listing-title { font-size: var(--text-2xl); }
  .listing-price { font-size: var(--text-3xl); }
}

/* ============================================================
   SINGLE BLOG POST — 2-COLUMN DESKTOP LAYOUT & CATEGORIES SIDEBAR
   ============================================================ */

.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

.single-post-main {
  min-width: 0;
}

.single-post-sidebar {
  display: block;
}

.sidebar-sticky-wrap {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.sidebar-card {
  padding: var(--space-6);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-xl);
  background: var(--rehome-surface);
}

.sidebar-card__header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rehome-border);
}

.sidebar-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--rehome-text);
  margin: 0;
  display: flex;
  align-items: center;
}

.blog-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.blog-category-item {
  border-radius: var(--radius-md);
  transition: background 0.15s ease, transform 0.15s ease;
}

.blog-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--rehome-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.blog-category-link:hover {
  background: var(--rehome-surface-elevated);
  color: var(--rehome-text);
  padding-left: var(--space-4);
}

.blog-category-item.is-active .blog-category-link {
  background: var(--rehome-primary-soft);
  color: var(--rehome-primary);
  font-weight: 600;
}

.blog-category-count {
  background: var(--rehome-surface-elevated);
  color: var(--rehome-text-subtle);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--rehome-border);
}

.blog-category-item.is-active .blog-category-count {
  background: var(--rehome-primary);
  color: var(--rehome-dark);
  border-color: var(--rehome-primary);
}

/* Latest Posts Widget (below categories in sidebar) */
.sidebar-latest-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar-latest-post-item {
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.sidebar-latest-post-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--rehome-text);
  transition: all var(--transition-fast);
}

.sidebar-latest-post-link:hover {
  background: var(--rehome-surface-elevated);
  transform: translateX(3px);
}

.sidebar-latest-post-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--rehome-surface-elevated);
  border: 1px solid var(--rehome-border);
}

.sidebar-latest-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-latest-post-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rehome-text-subtle);
}

.sidebar-latest-post-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-latest-post-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  color: var(--rehome-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.sidebar-latest-post-link:hover .sidebar-latest-post-title {
  color: var(--rehome-primary);
}

.sidebar-latest-post-date {
  font-size: 11px;
  color: var(--rehome-text-subtle);
}

/* Hide right sidebar completely on mobile & tablets (Desktop only) */
@media (max-width: 1024px) {
  .single-post-layout {
    grid-template-columns: 1fr;
  }
  .single-post-sidebar,
  .desktop-only-sidebar {
    display: none !important;
  }
  .single-post-main {
    max-width: 840px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--rehome-primary);
  color: var(--rehome-dark);
  font-weight: var(--weight-semibold);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus { top: var(--space-4); }

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  z-index: 90;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 900px) {
  .whatsapp-float {
    bottom: 80px; /* above mobile contact bar */
  }
}

/* Visibility utilities */
.hide-mobile  { display: flex; }
.hide-tablet  { display: flex; }
.show-mobile-only { display: none; }

@media (max-width: 1024px) {
  .hide-mobile  { display: none; }
  .show-mobile-only { display: flex; }
}

@media (max-width: 640px) {
  .hide-tablet { display: none !important; }
}

/* ── Seller Profile Hero Card ────────────────────────────── */
.seller-profile-page {
  padding-top: var(--space-6);
  padding-bottom: var(--space-16);
}

.seller-hero-card {
  background: var(--rehome-surface);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.seller-hero-card .card-body {
  padding: var(--space-8);
}

.seller-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-8);
  align-items: center;
}

.seller-hero-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.seller-hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--rehome-border);
  background: var(--rehome-bg);
  display: block;
}

.seller-hero-avatar-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--rehome-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.seller-hero-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.seller-hero-heading-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.seller-hero-title {
  font-size: clamp(1.4rem, 2.5vw, 1.875rem);
  font-weight: 700;
  color: var(--rehome-text);
  margin: 0;
  line-height: 1.25;
}

.seller-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  color: var(--rehome-text-muted);
  font-size: var(--text-sm);
}

.seller-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seller-hero-bio {
  color: var(--rehome-text);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: var(--space-2) 0 0;
  max-width: 680px;
}

.seller-hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.seller-hero-stats {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.seller-stat-box {
  background: var(--rehome-bg);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  text-align: center;
  min-width: 105px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.seller-stat-box:hover {
  transform: translateY(-2px);
  border-color: var(--rehome-primary);
}

.seller-stat-num {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--rehome-primary);
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.seller-stat-box--sold .seller-stat-num {
  color: var(--rehome-text-muted);
}

.seller-stat-lbl {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rehome-text-muted);
}

@media (max-width: 900px) {
  .seller-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-5);
  }

  .seller-hero-avatar-wrap {
    margin: 0 auto;
  }

  .seller-hero-heading-row {
    justify-content: center;
  }

  .seller-hero-meta {
    justify-content: center;
  }

  .seller-hero-bio {
    margin: 0 auto;
  }

  .seller-hero-actions {
    justify-content: center;
  }

  .seller-hero-stats {
    justify-content: center;
    width: 100%;
  }

  .seller-stat-box {
    flex: 1;
    max-width: 160px;
  }
}

/* ── Compare Listings Page & Matrix ──────────────────────── */
.compare-page {
  padding-top: var(--space-6);
  padding-bottom: var(--space-20);
}

.compare-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.compare-page-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--rehome-text);
  margin: var(--space-2) 0;
  line-height: 1.2;
}

.compare-page-subtitle {
  color: var(--rehome-text-muted);
  font-size: var(--text-sm);
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}

.compare-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Empty State */
.compare-empty-card {
  padding: var(--space-12) var(--space-8);
  text-align: center;
  border-radius: var(--radius-xl);
}

.compare-empty-icon {
  font-size: 56px;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.compare-empty-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--rehome-text);
  margin-bottom: var(--space-2);
}

.compare-empty-text {
  color: var(--rehome-text-muted);
  font-size: var(--text-sm);
  max-width: 520px;
  margin: 0 auto var(--space-6);
  line-height: 1.6;
}

.compare-empty-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.compare-quick-picker-panel {
  border-top: 1px solid var(--rehome-border);
  padding-top: var(--space-8);
  margin-top: var(--space-6);
}

.compare-quick-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--rehome-text);
  margin-bottom: var(--space-6);
}

.compare-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.compare-quick-card {
  text-align: left;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compare-quick-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: var(--rehome-bg);
}

.compare-quick-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.compare-quick-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--rehome-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-quick-price {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--rehome-primary);
  margin-bottom: var(--space-2);
}

/* Compare Matrix Table Wrap */
.compare-matrix-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.compare-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
}

.compare-matrix-table th,
.compare-matrix-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--rehome-border);
  vertical-align: middle;
  text-align: center;
}

.compare-cell-label {
  width: 180px;
  min-width: 160px;
  text-align: left !important;
  background: var(--rehome-surface-alt);
  color: var(--rehome-text);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid var(--rehome-border);
}

.compare-cell-sticky {
  position: sticky;
  left: 0;
  z-index: 5;
}

.compare-col-item {
  min-width: 230px;
  max-width: 300px;
  background: var(--rehome-surface);
  border-right: 1px solid var(--rehome-border);
}

.compare-col-empty {
  min-width: 200px;
  background: var(--rehome-surface-elevated);
}

.compare-card-head {
  position: relative;
  text-align: left;
}

.compare-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.btn-swap-listing {
  background: var(--rehome-bg);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--rehome-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-swap-listing:hover {
  background: var(--rehome-surface-elevated);
  color: var(--rehome-primary);
  border-color: var(--rehome-primary);
}

.btn-remove-compare {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-remove-compare:hover {
  background: #dc2626;
  color: #fff;
}

.compare-thumb-link {
  display: block;
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--rehome-bg);
  margin-bottom: var(--space-3);
}

.compare-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.compare-thumb-link:hover .compare-item-img {
  transform: scale(1.04);
}

.compare-item-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--rehome-primary);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.compare-item-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compare-item-title a {
  color: var(--rehome-text);
  text-decoration: none;
}

.compare-item-title a:hover {
  color: var(--rehome-primary);
}

.compare-add-slot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: 220px;
  background: transparent;
  border: 2px dashed var(--rehome-border-strong);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--rehome-text-muted);
  padding: var(--space-4);
}

.compare-add-slot-btn:hover {
  border-color: var(--rehome-primary);
  background: var(--rehome-primary-soft);
  color: var(--rehome-primary);
}

.compare-add-icon {
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.compare-add-text {
  font-size: var(--text-xs);
  font-weight: 700;
}

.compare-add-sub {
  font-size: 11px;
  color: var(--rehome-text-subtle);
}

.compare-cell-val {
  font-size: var(--text-sm);
  color: var(--rehome-text);
}

.compare-price-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--rehome-primary);
  display: block;
}

.compare-seller-link {
  color: var(--rehome-text);
  text-decoration: none;
  font-size: var(--text-sm);
}

.compare-seller-link:hover {
  color: var(--rehome-primary);
}

.compare-view-seller-btn {
  font-size: 11px;
  color: var(--rehome-primary);
  font-weight: 600;
  text-decoration: none;
}

.compare-view-seller-btn:hover {
  text-decoration: underline;
}

/* Highlight difference rows */
.is-difference-row {
  background: rgba(221, 161, 94, 0.08) !important;
}

.is-difference-row .compare-cell-label {
  background: rgba(221, 161, 94, 0.18) !important;
  color: var(--rehome-dark);
}

/* ── Listing Picker Modal ─────────────────────────────────── */
.compare-modal-search-wrap .form-input {
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
}

.picker-results-container {
  max-height: 380px;
  overflow-y: auto;
}

.picker-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.picker-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--rehome-border);
  border-radius: var(--radius-md);
  background: var(--rehome-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.picker-item-row:hover {
  border-color: var(--rehome-primary);
  background: var(--rehome-surface-elevated);
}

.picker-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rehome-bg);
}

.picker-item-info {
  flex: 1;
  min-width: 0;
}

.picker-item-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rehome-text);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-item-meta {
  font-size: var(--text-xs);
  color: var(--rehome-text-muted);
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.picker-item-price {
  color: var(--rehome-primary);
  font-weight: 700;
}

/* ── Floating Compare Tray ────────────────────────────────── */
.rehome-compare-tray {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rehome-dark);
  color: #F8F5ED;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 999;
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: compareTraySlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

@keyframes compareTraySlideUp {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.compare-tray-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.compare-tray-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
}

.compare-tray-text strong {
  color: var(--rehome-primary);
}

.compare-tray-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Compare button active state on listing cards */
.listing-card__compare-btn.is-comparing,
.listing-card__compare-btn.is-active {
  background: var(--rehome-primary) !important;
  color: var(--rehome-dark) !important;
  border-color: var(--rehome-primary) !important;
}


