/* ============================================================
   Zalin Labs - Rumah & Arsitektur 3D (G473, diperbarui G474)
   Katalog aset rumah lengkap untuk menjual desain arsitektur.
   G474 = koreksi persis mockup CEO (order RK-VL8AIN):
   - Filter 4 dropdown SEBARIS (Gaya/Lantai/Harga/Terbaru)
   - Tombol kartu = ghost outline ungu
   - Harga featured = ungu
   - Featured = gambar full-bleed + gradient menyatu
   - Count line hanya tampil saat filter aktif
   - Judul & meta kartu 1 baris rapi
   - Ikon kategori lingkaran + media full-bleed kiri
   - Underline navbar aktif (scope halaman ini)
   Pakai ulang navbar m3d-* + footer dari /3d/3d.css.
   ============================================================ */

.rm-body {
  background: #08080f;
  color: #f2f3f8;
}

.rm-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.rm-loading {
  padding: 80px 0;
  text-align: center;
  color: #8f93a8;
}

/* ---------- navbar: underline aktif (hanya halaman rumah) ---------- */
.rm-body .m3d-nav-link.active {
  position: relative;
}

.rm-body .m3d-nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: #6c5ce7;
}

/* ---------- baris chip kategori ---------- */
.rm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 4px;
}

.rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: #c9cddd;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rm-chip:hover {
  background: rgba(124, 108, 255, 0.12);
  border-color: rgba(124, 108, 255, 0.35);
  color: #ffffff;
}

.rm-chip.active {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #ffffff;
  font-weight: 600;
}

/* ---------- hero katalog: teks kiri + filter kanan ---------- */
.rm-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 22px 0 26px;
}

.rm-hero-info {
  flex: 1 1 400px;
  min-width: 0;
}

.rm-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a29bfe;
}

.rm-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.rm-sub {
  margin: 0;
  max-width: 640px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #9ba0b5;
}

/* ---------- panel filter (kanan): search + 4 dropdown sebaris ---------- */
.rm-filters {
  flex: 0 1 540px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rm-search {
  position: relative;
}

.rm-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8f93a8;
  pointer-events: none;
}

.rm-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px 11px 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f3f8;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rm-search input::placeholder { color: #7c8095; }

.rm-search input:focus {
  border-color: rgba(124, 108, 255, 0.55);
  background: rgba(124, 108, 255, 0.06);
}

/* G474: satu baris 4 dropdown - Gaya | Lantai | Harga | Terbaru */
.rm-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.rm-filter-row.rm-filter-right {
  justify-content: flex-start;
}

.rm-select {
  position: relative;
  display: inline-flex;
}

.rm-select select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 26px 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: #dfe1ee;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
  max-width: 100%;
}

.rm-select select:hover,
.rm-select select:focus {
  border-color: rgba(124, 108, 255, 0.55);
}

.rm-select select option {
  background: #14141f;
  color: #f2f3f8;
}

.rm-select::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid #8f93a8;
  border-bottom: 1.6px solid #8f93a8;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* G474: dropdown sort dengan ikon panah dua arah di kiri (mockup: "Terbaru") */
.rm-select.rm-sort select {
  padding-left: 30px;
}

/* G474 ronde 3: select harga dibatasi agar 4 dropdown muat sebaris
   (Chromium memberi width = option terpanjang; popup dropdown tetap penuh) */
#rm-price {
  max-width: 150px;
}

.rm-sort-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: #a29bfe;
  pointer-events: none;
  z-index: 1;
}

/* ---------- kartu featured (G474: gambar full-bleed + gradient menyatu) ---------- */
.rm-featured {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 270px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: #0e0e1a;
  overflow: hidden;
  margin: 6px 0 26px;
}

.rm-feat-info {
  position: relative;
  z-index: 2;
  max-width: 460px;
  padding: 28px 8px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.rm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 18, 0.55);
  color: #eef0f8;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.rm-badge svg { color: #a29bfe; }

.rm-feat-title {
  margin: 2px 0 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.rm-feat-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #a7abc0;
}

/* G474: harga featured ungu persis mockup */
.rm-price {
  font-size: 22px;
  font-weight: 800;
  color: #a29bfe;
}

.rm-price-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c8095;
  margin-bottom: 2px;
}

.rm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  border: none;
  background: #6c5ce7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.rm-btn:hover { background: #7d6ef0; }
.rm-btn:active { transform: translateY(1px); }

.rm-btn-sm {
  padding: 8px 13px;
  font-size: 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.rm-feat-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.rm-feat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

/* gradient kiri->kanan: panel info menyatu dengan gambar (persis mockup) */
.rm-feat-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #0e0e1a 0%,
    rgba(14, 14, 26, 0.96) 22%,
    rgba(14, 14, 26, 0.72) 38%,
    rgba(14, 14, 26, 0.28) 56%,
    rgba(14, 14, 26, 0.02) 78%,
    rgba(14, 14, 26, 0) 100%
  );
  pointer-events: none;
}

/* ---------- grid produk ---------- */
.rm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.rm-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #0e0e1a;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.rm-card:hover {
  border-color: rgba(124, 108, 255, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.rm-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #14141f;
}

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

.rm-card:hover .rm-card-media img { transform: scale(1.04); }

.rm-card-body {
  padding: 14px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* G474: judul kartu 1 baris rapi di desktop (persis mockup) */
.rm-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* G474: baris meta 1 baris (Lantai | GLB + Preview | Gaya) */
.rm-card-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 10px;
  color: #8f93a8;
  overflow: hidden;
  white-space: nowrap;
}

.rm-card-meta svg {
  width: 10px;
  height: 10px;
}

.rm-card-meta .rm-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.rm-card-meta svg { color: #a29bfe; }

.rm-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rm-card-price {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

/* G474: tombol kartu = ghost outline ungu (persis mockup; featured tetap solid) */
.rm-card-foot .rm-btn {
  background: transparent;
  border: 1px solid rgba(139, 127, 255, 0.55);
  color: #dcd8ff;
}

.rm-card-foot .rm-btn:hover {
  background: rgba(124, 108, 255, 0.16);
  border-color: rgba(162, 155, 254, 0.85);
  color: #ffffff;
}

/* ---------- section aset 3D lainnya ---------- */
.rm-other {
  margin: 40px 0 8px;
}

.rm-other-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.rm-other-sub {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #9ba0b5;
}

.rm-other-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* G474: media full-bleed kiri flush persis mockup */
.rm-other-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #0e0e1a;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.rm-other-card:hover {
  border-color: rgba(124, 108, 255, 0.45);
  transform: translateY(-2px);
}

.rm-other-media {
  flex: 0 0 138px;
  min-height: 96px;
  overflow: hidden;
  background: #14141f;
}

.rm-other-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rm-other-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

/* G474: ikon lingkaran solid ungu, overlap tepi gambar - persis mockup */
.rm-other-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6c5ce7;
  color: #ffffff;
  border: 2px solid #0e0e1a;
  margin-left: -20px;
  position: relative;
  z-index: 1;
}

.rm-other-name {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.rm-other-desc {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: #8f93a8;
}

.rm-other-arrow {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c9cddd;
  margin-right: 10px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rm-other-card:hover .rm-other-arrow {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #ffffff;
}

/* ---------- hasil + kosong ---------- */
/* G474: count line hanya tampil saat filter aktif (mockup bersih tanpa count) */
.rm-count {
  display: none;
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #8f93a8;
}

.rm-count.rm-show { display: block; }

.rm-count b { color: #dfe1ee; }

.rm-empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #9ba0b5;
}

.rm-empty-actions { margin-top: 14px; }

.rm-link-btn {
  display: inline-flex;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(124, 108, 255, 0.5);
  color: #c9c2ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.rm-link-btn:hover { background: rgba(124, 108, 255, 0.15); color: #ffffff; }

.rm-err {
  padding: 48px 20px;
  text-align: center;
  color: #ff9c9c;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .rm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-card-title { white-space: normal; }
  .rm-card-meta { flex-wrap: wrap; white-space: normal; gap: 6px 12px; }
  .rm-featured {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    min-height: 360px;
  }
  .rm-feat-info { max-width: none; padding: 0 20px 22px; }
  .rm-feat-media::after {
    background: linear-gradient(
      0deg,
      rgba(14, 14, 26, 0.97) 0%,
      rgba(14, 14, 26, 0.78) 42%,
      rgba(14, 14, 26, 0.28) 100%
    );
  }
}

@media (max-width: 640px) {
  .rm-wrap { padding: 0 14px 32px; }
  .rm-grid { grid-template-columns: 1fr; }
  .rm-other-grid { grid-template-columns: 1fr; }
  .rm-hero { padding: 14px 0 20px; }
  .rm-feat-info { padding: 0 16px 20px; }
  .rm-chip { padding: 8px 14px; font-size: 12.5px; }
  .rm-other-media { flex: 0 0 120px; }
  .rm-filter-row.rm-filter-right { justify-content: flex-start; }
}

/* G473 polish QA: harga kartu tetap 1 baris, tombol boleh turun */
.rm-card-price { white-space: nowrap; }
.rm-card-foot { flex-wrap: wrap; }
