.market-home {
  --mh-ink: #f5f6f6;
  --mh-muted: #b2b8c3;
  --mh-line: #d4e3ff27;
  --mh-line-active: #c4dcf97a;
  --mh-surface: #171a20;
  --mh-recess: #141820;
  --mh-highlight: #d9e6f7;
  --mh-display: Golos, system-ui, sans-serif;
  min-inline-size: 0;
  color: var(--mh-ink);
}

.market-home:lang(ar) {
  --mh-display: 'Noto Sans Arabic', 'Geeza Pro', Tahoma, sans-serif;
}

.market-home-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(20px, 2.8vw, 42px);
}

.market-home-options {
  display: grid;
  align-content: start;
  gap: clamp(14px, 1.45vw, 22px);
  min-inline-size: 0;
}

.market-home h1,
.market-home h2 {
  margin: 0;
  font-family: var(--mh-display);
  font-weight: 560;
  letter-spacing: -.044em;
  line-height: 1.13;
  text-wrap: balance;
}

.market-home h1 {
  font-size: clamp(2.1rem, 3.85vw, 4.5rem);
  line-height: 1.05;
}
.market-home h2 { font-size: clamp(1.22rem, 1.8vw, 1.72rem); }
.market-home:lang(ar) :is(h1, h2) { letter-spacing: 0; line-height: 1.38; }

.market-home-intro > p {
  margin-block-start: 10px;
  color: var(--mh-muted);
  font-size: clamp(.88rem, 1.08vw, 1.04rem);
  line-height: 1.5;
}

.market-home-form {
  padding: 12px;
  border: 1px solid var(--mh-line);
  border-radius: 17px;
  background: linear-gradient(135deg, #2b3544a6, #1a1e27b3 70%);
  box-shadow: inset 0 1px #e2edff16, 0 16px 34px -26px #020407d9;
}

.market-home-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

.market-home-field {
  display: grid;
  gap: 6px;
  min-inline-size: 0;
  color: var(--mh-muted);
  font-size: .8rem;
}

.market-home-field > span { padding-inline-start: 2px; }

.market-home-field select {
  min-inline-size: 0;
  inline-size: 100%;
  min-block-size: 46px;
  padding: 7px 10px;
  border: 1px solid var(--mh-line);
  border-radius: 10px;
  background-color: var(--mh-recess);
  color: var(--mh-ink);
  color-scheme: dark;
  font-size: .87rem;
}

.market-home-field select:hover:not(:disabled) { border-color: var(--mh-line-active); }
.market-home-field select:disabled { opacity: .6; }

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

.market-home .market-home-submit,
.market-home-mobile-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 46px;
  padding: 9px clamp(12px, 1.25vw, 19px);
  border: 1px solid #eaf2fd;
  border-radius: 999px;
  color: #111925;
  background: linear-gradient(140deg, #f7faff, #d9e6f7);
  font-size: .82rem;
  font-weight: 640;
  line-height: 1.2;
  cursor: pointer;
}

.market-home .market-home-submit:hover:not(:disabled) { background: #fff; }
.market-home-submit:disabled { opacity: .6; cursor: default; }

.market-home-mobile-map {
  display: none;
  border-color: var(--mh-line-active);
  color: var(--mh-highlight);
  background: #141820;
}

.market-home-status {
  margin-block-start: 8px;
  color: var(--mh-muted);
  font-size: .8rem;
  line-height: 1.4;
}
.market-home-status:empty { display: none; }

.market-home-group-head,
.market-home-map-head,
.market-home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 14px;
  min-inline-size: 0;
}

.market-home-group-head { margin-block-end: 8px; }

.market-home-group-head .market-home-link {
  gap: 7px;
  font-size: .8rem;
  color: var(--mh-highlight);
  text-decoration: none;
}
.market-home-group-head .market-home-link:hover { text-decoration: underline; }
.market-home-inline-arrow { display: inline-block; font-size: .85em; }
.market-home:dir(rtl) .market-home-inline-arrow { transform: scaleX(-1); }

.market-home-categories,
.market-home-listings {
  display: grid;
  gap: clamp(8px, 1.2vw, 17px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.market-home-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.market-home-category-group[data-offer='lease'] .market-home-categories {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.market-home-categories > li { min-inline-size: 0; }

.market-home-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  block-size: 100%;
  overflow: hidden;
  border: 1px solid var(--mh-line);
  border-radius: 14px;
  background: linear-gradient(147deg, #222833, #171a20 63%);
  color: var(--mh-ink);
  box-shadow: 0 9px 23px -20px #000;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.market-home-tile:hover {
  border-color: var(--mh-line-active);
  box-shadow: 0 12px 24px -16px #020509;
  transform: translateY(-2px);
}

.market-home-tile-image,
.market-home-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(155deg, #34363b, #222429 70%);
}

.market-home-tile-image {
  block-size: clamp(68px, 7.55vw, 119px);
  background: transparent;
  mask-image: linear-gradient(#000 74%, #000c 91%, transparent);
}

.market-home-tile-image img,
.market-home-card-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.market-home-tile-image img {
  filter: saturate(.8) brightness(1.03);
  transition: filter .18s ease, transform .18s ease;
}

.market-home-tile:hover .market-home-tile-image img {
  filter: brightness(1.12);
  transform: scale(1.035);
}

.market-home-tile-label {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  min-block-size: 40px;
  padding: 6px clamp(8px, .95vw, 14px) 10px;
  font-size: clamp(.74rem, .98vw, .93rem);
  font-weight: 540;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.market-home-tile-label > :last-child:not(:first-child) {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  display: grid;
  place-items: center;
  inline-size: 24px;
  block-size: 24px;
  border: 1px solid #ffffff36;
  border-radius: 50%;
  color: var(--mh-highlight);
  background: #141820cc;
}

.market-home:dir(rtl) .market-home-tile-label > :last-child:not(:first-child) { transform: scaleX(-1); }
.market-home-tile:hover .market-home-tile-label > :last-child { background: #eef5ff; color: #111925; }

.market-home-map {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-inline-size: 0;
  min-block-size: 0;
  padding: clamp(10px, 1.05vw, 17px);
  border: 1px solid var(--mh-line);
  border-radius: 20px;
  background: linear-gradient(155deg, #3340519c, #1b2029bd 50%, #161a20eb);
  box-shadow: 0 20px 48px -34px #020407, inset 0 1px #d3e2fb18;
}

.market-home-map-head h2 { font-size: clamp(1.1rem, 1.49vw, 1.4rem); }

.market-home-map-head { align-items: center; }

.market-home-map-context {
  margin-block-start: 5px;
  color: var(--mh-muted);
  font-size: .77rem;
  line-height: 1.4;
}
.market-home-map-context:empty { display: none; }

.market-home-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-block-size: 38px;
  padding: 6px 11px;
  border: 1px solid var(--mh-line);
  border-radius: 999px;
  color: var(--mh-highlight);
  background: #14182057;
  font-size: .76rem;
}

.market-home-map-link:hover { border-color: var(--mh-line-active); }

.market-home-map-canvas {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-inline-size: 0;
  min-block-size: 300px;
}

.market-home-map-canvas > .pat-map-frame {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-block-size: 300px;
  overflow: hidden;
  border: 1px solid #ffffff27;
  border-radius: 12px;
  background: #242a2d;
}

.market-home-map-canvas .pat-map-canvas {
  flex: 1;
  block-size: auto;
  min-block-size: 300px;
  background-color: #2a3033;
}

.market-home-map-canvas .leaflet-tile-pane {
  filter: saturate(.34) brightness(.93);
}

@media (max-width: 780px) {
  .market-home-workbench { grid-template-columns: minmax(0, 1fr); }
  .market-home-actions { grid-column: 1 / -1; }
  .market-home-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-home .market-home-submit { flex: 1; }
  .market-home-mobile-map { display: inline-flex; min-inline-size: 86px; }
  .market-home-options { gap: 16px; }
  .market-home-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-home-tile-image { block-size: clamp(68px, 16vw, 134px); }
}

@media (prefers-reduced-motion: reduce) {
  .market-home-tile,
  .market-home-tile-image img { transition: none; }
  .market-home-tile:hover,
  .market-home-tile:hover .market-home-tile-image img { transform: none; }
}

.market-home-map-canvas .pat-map-message {
  margin-block-start: 8px;
  border-color: var(--mh-line);
  background: var(--mh-recess);
  color: var(--mh-muted);
}

.market-home-section {
  margin-block-start: clamp(24px, 3.2vw, 48px);
  padding-block-start: clamp(16px, 1.8vw, 27px);
  border-block-start: 1px solid var(--mh-line);
}

.market-home-section-head {
  align-items: center;
  margin-block-end: 16px;
}

.market-home-section-head h2 {
  font-size: clamp(1.55rem, 2.65vw, 2.5rem);
}

.market-home-caption {
  color: var(--mh-muted);
  font-size: .82rem;
  line-height: 1.42;
}

.market-home-caption:not(:empty) { margin-block-end: 3px; }

.market-home-link,
.market-home-retry {
  color: var(--mh-ink);
  text-decoration: underline;
  text-decoration-color: #ffffff77;
  text-underline-offset: 3px;
  font-weight: 540;
  line-height: 1.45;
}

.market-home-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
}
.market-home-link:hover,
.market-home-retry:hover { text-decoration-color: currentColor; }

.market-home-see-all {
  flex: none;
  min-block-size: 40px;
  padding: 6px 15px;
  border: 1px solid var(--mh-line-active);
  border-radius: 999px;
  font-size: .85rem;
  text-decoration: none;
}

.market-home-see-all:hover { background: #ffffff10; }

.market-home :is(a, button, select):focus-visible {
  outline: 2px solid #e7e9ed;
  outline-offset: 3px;
}

.market-home-listings {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.market-home-listings--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.market-home-card {
  position: relative;
  min-inline-size: 0;
  border: 1px solid var(--mh-line);
  border-radius: 12px;
  background: linear-gradient(155deg, #212328, var(--mh-surface) 65%);
}

.market-home-card:not(.market-home-card--featured):only-child { max-inline-size: 32rem; }

.market-home-card.is-map-selected {
  outline: 2px solid var(--mh-highlight);
  outline-offset: 3px;
}

.market-home-card--featured {
  grid-column: 1 / -1;
  border-color: #ffffff38;
  background: linear-gradient(135deg, #242932, #191c22 75%);
  box-shadow: 0 14px 36px #03040544;
}

.market-home-card-link {
  display: flex;
  flex-direction: column;
  min-block-size: 100%;
  color: var(--mh-ink);
  border-radius: inherit;
}

.market-home-card-link:hover h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.market-home-card--featured .market-home-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
}

.market-home-card-media {
  aspect-ratio: 1.95;
  border-start-start-radius: 11px;
  border-start-end-radius: 11px;
  isolation: isolate;
}

.market-home-card-media--plan { background: #f3f3f4; }
.market-home-card-media--plan img { object-fit: contain; padding: 20px 10px 5px; }

.market-home-card--featured .market-home-card-media {
  aspect-ratio: auto;
  min-block-size: clamp(215px, 25vw, 345px);
  border-start-end-radius: 0;
  border-end-start-radius: 11px;
}

.market-home-card--featured .market-home-card-media:not(.market-home-card-media--plan) img {
  position: absolute;
  inset: 0;
}

.market-home-card--featured .market-home-card-media--plan {
  display: grid;
  align-items: center;
  padding: clamp(14px, 3.3vw, 42px);
  background: #f7f7f8;
}

.market-home-card--featured .market-home-card-media--plan img {
  display: block;
  block-size: auto;
  max-block-size: 330px;
  padding: 0;
}

.market-home-badge {
  position: absolute;
  inset-inline-start: 7px;
  inset-block-start: 7px;
  max-inline-size: calc(100% - 50px);
  padding: 4px 7px;
  border: 1px solid #ffffff33;
  border-radius: 4px;
  color: #f3f4f5;
  background: #14161adf;
  font-size: .69rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.market-home-badge--demo { color: #dcdfdf; background: #292c32ed; }

.market-home-card--featured .market-home-badge {
  position: static;
  justify-self: start;
  max-inline-size: calc(100% - 38px);
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffffff0b;
}

.market-home-card .market-home-favorite {
  display: grid;
  place-items: center;
  position: absolute;
  inset-inline-end: 7px;
  inset-block-start: 7px;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 1px solid #ffffff51;
  border-radius: 50%;
  background: #121416e6;
  color: var(--mh-ink);
  font-size: 1.26rem;
  line-height: 1;
  cursor: pointer;
}

.market-home-card--featured .market-home-favorite {
  inset-inline-end: 12px;
  inset-block-start: 12px;
}

.market-home-card--featured .market-home-favorite:focus-visible { outline-color: #8197b7; }

.market-home-favorite[aria-pressed='true'] {
  background: #f4f5f5;
  color: #1a1d20;
}

.market-home-favorite-status:not(:empty) {
  display: block;
  margin: 0 12px 10px;
  color: #e2b5af;
  font-size: .8rem;
}

.market-home-card-info {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: clamp(10px, 1.25vw, 17px);
}

.market-home-card--featured .market-home-card-info {
  align-content: center;
  gap: 8px;
  padding: clamp(18px, 3.1vw, 42px);
}

.market-home-card-price { font-size: .92rem; font-weight: 660; }

.market-home-card--featured .market-home-card-price {
  margin-block-start: 2px;
  font-size: 1.04rem;
}

.market-home-card-info h3 {
  margin: 0;
  font-family: var(--mh-display);
  font-weight: 560;
  font-size: clamp(.94rem, 1.14vw, 1.12rem);
  line-height: 1.23;
  overflow-wrap: anywhere;
}

.market-home-card--featured h3 {
  font-size: clamp(1.45rem, 2.65vw, 2.6rem);
  letter-spacing: -.035em;
  line-height: 1.1;
}

.market-home:lang(ar) .market-home-card--featured h3 {
  letter-spacing: normal;
  line-height: 1.3;
}

.market-home-address,
.market-home-area,
.market-home-card-description {
  color: var(--mh-muted);
  font-size: .81rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.market-home-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
}

.market-home-area bdi::before {
  display: inline-block;
  margin-inline-end: 8px;
  color: #a9abb0;
  content: '·';
}

.market-home-card--featured .market-home-area {
  color: var(--mh-ink);
  font-size: .89rem;
  font-weight: 600;
}

.market-home-card--featured .market-home-address,
.market-home-card-description {
  font-size: .9rem;
}

.market-home-card-cta {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 10px;
  min-block-size: 43px;
  margin-block-start: 4px;
  padding: 8px 15px;
  border-radius: 999px;
  background: #f0f1f2;
  color: #181b20;
  font-size: .85rem;
  font-weight: 650;
}

.market-home-card-link:hover .market-home-card-cta { background: #fff; }

.market-home-feedback {
  padding: 14px 16px;
  border: 1px solid var(--mh-line);
  border-radius: 7px;
  background: var(--mh-surface);
  color: var(--mh-muted);
}

.market-home-retry {
  min-block-size: 38px;
  padding: 0;
  margin-block-start: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

@media (max-width: 780px) {
  .market-home-listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .market-home-card--featured .market-home-card-link { grid-template-columns: minmax(0, 1fr); }
  .market-home-card--featured .market-home-card-media {
    min-block-size: clamp(155px, 36vw, 240px);
    border-start-end-radius: 11px;
    border-end-start-radius: 0;
  }
  .market-home-card--featured .market-home-badge { max-inline-size: 100%; }
}

@media (max-width: 450px) {
  .market-home-listings { grid-template-columns: minmax(0, 1fr); }
}

