:root {
  --text: #eaf0ff;
  --muted: #9bafd8;
  --line: #294062;
  --surface: #111c32;
  --surface-soft: #172746;
  --primary: #4f46ff;
  --primary-soft: #7f8fff;
  --shadow: 0 20px 44px rgba(2, 8, 22, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(165deg, #0b1222 0, #0f1830 50%, #101d35 100%);
  transition: background 0.25s ease, color 0.25s ease;
  position: relative;
}

body.theme-fade { animation: fade 0.45s ease; }
@keyframes fade { 0% { opacity: 1; } 45% { opacity: 0.72; } 100% { opacity: 1; } }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 9998;
  background:
    radial-gradient(circle at 20% 30%, rgba(119, 153, 255, 0.24), transparent 45%),
    radial-gradient(circle at 82% 70%, rgba(165, 106, 255, 0.2), transparent 48%),
    linear-gradient(165deg, #0a1430 0%, #102450 52%, #0b1838 100%);
  filter: blur(8px) saturate(120%);
}

body.page-enter-search .page {
  animation: page-enter-content 0.56s cubic-bezier(0.2, 0.78, 0.3, 1) both;
}

body.page-enter-search::before {
  animation: page-enter-overlay 0.56s cubic-bezier(0.2, 0.78, 0.3, 1) forwards;
}

@keyframes page-enter-content {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes page-enter-overlay {
  0% {
    opacity: 0.92;
    transform: scale(1.08);
    filter: blur(8px) saturate(120%);
  }
  100% {
    opacity: 0;
    transform: scale(1);
    filter: blur(0px) saturate(100%);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  filter: blur(8px);
  will-change: opacity, transform, filter;
}

.reveal.in-view {
  animation: element-reveal 0.62s cubic-bezier(0.2, 0.78, 0.3, 1) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes element-reveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(8px);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.002);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .reveal.in-view {
    animation: none;
  }
}

.page { width: min(1240px, 95vw); margin: 0 auto; padding: 24px 0 40px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { text-decoration: none; color: inherit; font-family: "Sora", sans-serif; font-size: 1.9rem; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; }
.brand-bubble { width: 34px; height: 34px; border-radius: 8px; background: url("../assets/flatbuddy-logo.png") center/cover no-repeat; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.back-btn { text-decoration: none; color: #d6e3ff; border: 1px solid rgba(127, 162, 232, 0.35); background: rgba(20, 34, 60, 0.9); border-radius: 999px; padding: 10px 16px; font-weight: 700; }

.theme-toggle { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(127, 162, 232, 0.35); background: rgba(20, 34, 60, 0.9); display: grid; place-items: center; position: relative; cursor: pointer; }
.theme-icon { position: absolute; font-size: 1.2rem; transition: transform 0.35s ease, opacity 0.35s ease; }
.theme-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-moon { opacity: 1; transform: rotate(0deg) scale(1); }
body[data-theme="light"] .theme-sun { opacity: 1; transform: rotate(0deg) scale(1); }
body[data-theme="light"] .theme-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
.theme-toggle.is-rotating { animation: spin 0.45s ease; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }

.shell {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.search-layout { display: grid; gap: 12px; }

.search-row {
  display: grid;
  gap: 10px;
}

.search-row-main {
  grid-template-columns: 1.4fr 1fr 1fr 1fr 140px;
}

.search-row-filters {
  grid-template-columns: repeat(4, minmax(0, max-content));
  align-items: center;
}

.pill {
  height: 58px;
  border: 1px solid #2f4468;
  border-radius: 999px;
  background: linear-gradient(150deg, rgba(22, 38, 67, 0.96), rgba(20, 33, 59, 0.9));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.pill-grow { min-width: 0; }

.pill-icon {
  color: #b6caef;
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.pill input,
.pill select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  color: #e6efff;
  font-size: 1.06rem;
  font-weight: 600;
}

.pill input[type="date"] {
  color-scheme: dark;
  padding-right: 6px;
}

.pill input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 10px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(97, 142, 255, 0.28), rgba(63, 121, 255, 0.14));
  box-shadow: inset 0 0 0 1px rgba(120, 162, 255, 0.34);
  filter: brightness(1.15);
}

.pill input::placeholder { color: #a9b9d8; }

.search-btn {
  height: 58px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(130deg, var(--primary), #6a5cff);
  box-shadow: 0 10px 22px rgba(80, 70, 255, 0.34);
  cursor: pointer;
}

.filter-chip {
  border: 1px solid #304a73;
  border-radius: 999px;
  background: #162641;
  color: #c4d3f0;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 11px 18px;
  cursor: pointer;
}

.filter-chip.active {
  background: rgba(79, 70, 255, 0.2);
  border-color: rgba(128, 144, 255, 0.55);
  color: #e7ebff;
}

.all-filters-panel {
  border-top: 1px solid rgba(57, 81, 121, 0.45);
  margin-top: 2px;
  padding-top: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 0.36s ease, opacity 0.28s ease, transform 0.28s ease;
}

.all-filters-panel.open {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
}

.all-filters-title {
  color: #a8bcdf;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.all-filters-grid {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.all-filter-chip {
  padding: 8px 14px;
  font-size: 0.88rem;
  background: rgba(20, 35, 60, 0.92);
}

.results-head {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-title h2 {
  font-family: "Sora", sans-serif;
  font-size: 1.58rem;
}

.results-title p {
  margin-top: 4px;
  color: var(--muted);
}

.view-actions { display: flex; gap: 8px; }

.view-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #2f466f;
  background: #162741;
  color: #d2e0ff;
  font-size: 1.12rem;
}

.view-btn.active {
  background: linear-gradient(130deg, #1c2b4f, #1a2f66);
  border-color: #4966a8;
}

.results-list {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.result-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  border: 1px solid #31496f;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(150deg, #15233f, #162948);
}

.result-media {
  min-height: 220px;
  background: linear-gradient(145deg, #1a4d8e, #2f6fcf);
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.media-track {
  position: absolute;
  inset: 0;
}

.media-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.media-slide.active {
  opacity: 1;
  transform: scale(1);
}

.media-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.media-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(232, 240, 255, 0.45);
  border: 1px solid rgba(210, 226, 255, 0.55);
  cursor: pointer;
}

.media-dot.active {
  width: 18px;
  background: #f3f7ff;
}

.result-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(36, 214, 132, 0.92);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.result-main {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.result-name {
  font-family: "Sora", sans-serif;
  font-size: 1.88rem;
  letter-spacing: -0.02em;
}

.result-rating {
  margin-top: 8px;
  color: #d7e4ff;
  font-weight: 600;
}

.result-rating span { color: #9fb3da; }

.result-features {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-features li {
  list-style: none;
  border: 1px solid #33507d;
  background: rgba(24, 41, 72, 0.86);
  border-radius: 999px;
  color: #c7d8f7;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.result-meta {
  margin-top: 10px;
  color: #9fb3da;
  font-size: 0.95rem;
}

.result-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.result-price {
  text-align: right;
}

.result-price strong {
  font-family: "Sora", sans-serif;
  display: block;
  font-size: 2rem;
  color: #f0f5ff;
}

.result-price span {
  color: #8fb2f4;
  font-weight: 600;
}

.result-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #36517d;
  border-radius: 50%;
  background: #1a2c4b;
  color: #d2e0ff;
  cursor: pointer;
}

.book-btn {
  height: 42px;
  border: none;
  border-radius: 999px;
  padding: 0 20px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(130deg, #5d49ff, #7464ff);
  cursor: pointer;
}

.empty { margin-top: 12px; color: #fda4af; font-weight: 600; }
.hidden { display: none; }

.listing-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(9, 16, 31, 0.74);
  backdrop-filter: blur(5px);
  padding: 24px;
  display: grid;
  place-items: center;
}

.listing-modal-backdrop.hidden {
  display: none;
}

.listing-modal-sheet {
  width: min(1200px, 96vw);
  max-height: 95vh;
  border-radius: 20px;
  border: 1px solid #d9e2ef;
  background: #ffffff;
  color: #242a34;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.listing-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d4d9e2;
  background: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  color: #1f2b3f;
  cursor: pointer;
  z-index: 2;
}

.listing-modal-scroll {
  max-height: 95vh;
  overflow: auto;
  padding: 30px 30px 36px;
}

.d-title {
  font-family: "Sora", sans-serif;
  font-size: 2.15rem;
  color: #1f2531;
}

.d-gallery {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, 190px);
  gap: 8px;
}

.d-gallery.count-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 360px;
}

.d-gallery.count-2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 260px;
}

.d-gallery.count-3 {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: repeat(2, 190px);
}

.d-gallery.count-4 {
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, 190px);
}

.d-gallery.count-5 {
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, 190px);
}

.d-photo {
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  cursor: zoom-in;
}

.d-photo.hero {
  grid-row: 1 / span 2;
}

.d-gallery.count-3 .d-photo.hero {
  grid-row: 1 / span 2;
}

.d-gallery.count-4 .d-photo.hero,
.d-gallery.count-5 .d-photo.hero {
  grid-row: 1 / span 2;
}

.d-main {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 28px;
}

.d-place {
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  color: #1f2531;
}

.d-sub {
  margin-top: 6px;
  color: #525a68;
  font-size: 1.35rem;
}

.d-highlights {
  margin-top: 24px;
  border-top: 1px solid #e7eaf0;
  border-bottom: 1px solid #e7eaf0;
  padding: 22px 0;
  display: grid;
  gap: 14px;
}

.d-host-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.d-host-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #d6dbe6;
  background: linear-gradient(145deg, #d9e4f8, #c1d4f3);
  object-fit: cover;
}

.d-highlight h4 {
  font-size: 1.34rem;
  color: #242a34;
}

.d-highlight p {
  color: #6a7180;
  margin-top: 4px;
}

.d-offers-title {
  margin-top: 24px;
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  color: #1f2531;
}

.d-detail-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.d-detail-row {
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #fafbfe;
  padding: 10px 12px;
}

.d-detail-row span {
  display: block;
  color: #6b7382;
  font-size: 0.86rem;
}

.d-detail-row strong {
  display: block;
  margin-top: 4px;
  color: #1f2531;
  font-size: 1rem;
}

.d-offers {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.d-offer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2b3341;
  font-size: 1.3rem;
}

.d-offer::before {
  content: "•";
  color: #7f8797;
}

.d-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.d-price-chip {
  border: 1px solid #eceef3;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px 18px;
  font-size: 1.35rem;
  color: #2f3644;
  box-shadow: 0 10px 30px rgba(21, 33, 58, 0.08);
}

.d-card {
  border: 1px solid #e7eaf0;
  border-radius: 16px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(21, 33, 58, 0.08);
}

.d-card-price {
  font-size: 2.05rem;
  color: #1f2531;
  font-family: "Sora", sans-serif;
}

.d-card-price span {
  font-size: 1.2rem;
  color: #5e6677;
}

.d-charge-line {
  margin-top: 8px;
  color: #60697b;
  font-size: 0.96rem;
}

.d-booking-grid {
  margin-top: 16px;
  border: 1px solid #d8dde8;
  border-radius: 12px;
  overflow: hidden;
}

.d-booking-grid .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.d-booking-grid .row + .row {
  border-top: 1px solid #d8dde8;
}

.d-booking-grid .cell {
  padding: 12px 14px;
}

.d-booking-grid .cell + .cell {
  border-left: 1px solid #d8dde8;
}

.d-booking-grid label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555f72;
  text-transform: uppercase;
}

.d-booking-grid .value {
  margin-top: 4px;
  font-size: 1.15rem;
  color: #1f2531;
}

.d-action-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.d-chat-btn {
  width: 56px;
  height: 50px;
  border: 1px solid #d8dde8;
  border-radius: 18px;
  background: #ffffff;
  color: #44506a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 33, 58, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.d-chat-btn:hover {
  transform: translateY(-1px);
  border-color: #c5d3f1;
  box-shadow: 0 14px 28px rgba(28, 45, 82, 0.12);
  color: #2d4fff;
}

.d-chat-btn:active {
  transform: translateY(0);
}

.d-chat-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.d-reserve {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(130deg, #ff385c, #e31c5f);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
}

.d-note {
  margin-top: 12px;
  text-align: center;
  color: #6a7180;
}

body[data-theme="dark"] .d-chat-btn {
  border-color: rgba(105, 136, 204, 0.34);
  background: rgba(20, 31, 58, 0.9);
  color: #d9e4ff;
  box-shadow: 0 14px 30px rgba(5, 12, 26, 0.32);
}

body[data-theme="dark"] .d-chat-btn:hover {
  border-color: rgba(104, 139, 255, 0.72);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(42, 84, 255, 0.2);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(9, 15, 29, 0.86);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 26px;
}

.image-lightbox.hidden {
  display: none;
}

.image-lightbox-img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
  object-fit: contain;
  background: #fff;
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(230, 236, 247, 0.7);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 13100;
  background: rgba(9, 15, 29, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.contact-modal-backdrop.hidden {
  display: none;
}

.contact-modal {
  width: min(560px, 92vw);
  border-radius: 18px;
  border: 1px solid #dce2ec;
  background: #ffffff;
  padding: 22px 20px 18px;
  position: relative;
  box-shadow: 0 22px 48px rgba(7, 18, 38, 0.28);
}

.contact-modal h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.45rem;
  color: #1f2531;
}

.contact-modal p {
  margin-top: 10px;
  color: #596275;
  font-size: 1.05rem;
  line-height: 1.55;
}

.contact-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d7dde8;
  background: #ffffff;
  color: #1d2b45;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.contact-modal-ok {
  margin-top: 16px;
  height: 44px;
  min-width: 120px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(130deg, #5d49ff, #7464ff);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body[data-theme="light"] .listing-modal-backdrop {
  background: rgba(16, 28, 49, 0.45);
}

body[data-theme="light"] {
  --text: #16233f;
  --muted: #5c7195;
  --line: #d3e0f5;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --shadow: 0 20px 40px rgba(11, 33, 79, 0.12);
  background: radial-gradient(circle at 10% 12%, #ffffff 0, #eff4ff 42%), linear-gradient(160deg, #eff4ff 0, #e8f0ff 100%);
}

body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .back-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #153466;
  border-color: rgba(10, 91, 255, 0.25);
}

body[data-theme="light"] .pill,
body[data-theme="light"] .filter-chip,
body[data-theme="light"] .view-btn,
body[data-theme="light"] .result-card,
body[data-theme="light"] .result-features li,
body[data-theme="light"] .icon-btn {
  border-color: #d4e1f6;
  background: #f7faff;
  color: #1c345f;
}

body[data-theme="light"] .pill input,
body[data-theme="light"] .pill select,
body[data-theme="light"] .results-title p,
body[data-theme="light"] .result-rating,
body[data-theme="light"] .result-meta {
  color: #405c8d;
}

body[data-theme="light"] .result-name,
body[data-theme="light"] .result-price strong {
  color: #152a4d;
}

body[data-theme="light"] .result-features li {
  background: #ffffff;
  color: #315084;
}

body[data-theme="light"] .pill input[type="date"] {
  color-scheme: light;
}

body[data-theme="light"] .pill input[type="date"]::-webkit-calendar-picker-indicator {
  background: linear-gradient(135deg, rgba(10, 91, 255, 0.15), rgba(74, 128, 255, 0.09));
  box-shadow: inset 0 0 0 1px rgba(10, 91, 255, 0.2);
  filter: none;
}

body[data-theme="light"] .filter-chip.active {
  background: linear-gradient(135deg, #2f6dff, #1f5dff);
  border-color: rgba(18, 88, 255, 0.74);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(26, 95, 255, 0.2);
}

body[data-theme="light"] .all-filters-panel {
  border-top-color: rgba(187, 204, 235, 0.8);
}

body[data-theme="light"] .all-filters-title {
  color: #5875a7;
}

body[data-theme="light"] .all-filter-chip {
  background: #f7faff;
}

@media (max-width: 1100px) {
  .search-row-main { grid-template-columns: 1fr 1fr; }
  .search-btn { grid-column: span 2; }
  .search-row-filters { grid-template-columns: repeat(2, minmax(0, max-content)); }
  .result-card { grid-template-columns: 1fr; }
  .result-media { min-height: 200px; }
  .d-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 160px);
  }
  .d-photo.hero {
    grid-column: 1 / span 2;
    grid-row: 1 / span 1;
  }
  .d-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .all-filters-panel.open {
    max-height: 560px;
  }

  .topbar { flex-direction: column; align-items: flex-start; }
  .search-row-main,
  .search-row-filters { grid-template-columns: 1fr; }
  .search-btn { grid-column: auto; }
  .results-head { flex-direction: column; align-items: flex-start; }
  .result-main { grid-template-columns: 1fr; }
  .result-side { align-items: flex-start; }
  .result-price { text-align: left; }
  .listing-modal-backdrop {
    padding: 10px;
  }
  .listing-modal-scroll {
    padding: 18px 14px 22px;
  }
  .d-title {
    font-size: 1.45rem;
    padding-right: 40px;
  }
  .d-place {
    font-size: 1.5rem;
  }
  .d-sub {
    font-size: 1.05rem;
  }
  .d-offers {
    grid-template-columns: 1fr;
  }
  .d-detail-grid {
    grid-template-columns: 1fr;
  }
}
