/*--------------------------------------------------------------
# Alshaheen CMS — styles for the UI rendered by assets/js/cms.js
#
#   1. Shared bits: badges, prices, stats, buttons, state messages
#  1b. Replaced template photos      img[data-cms-overridden]
#   2. Home page featured cards      [data-cms-featured]
#   3. Listing page                  [data-cms-listing]
#   4. Property details              [data-cms-property]
#   5. Lightbox
#   6. Dashboard preview outlines    (html.cms-preview only)
#
# Loaded after rtl.css. Direction-aware layout uses logical
# properties (margin-inline-start, inset-inline-end, ...) so one
# rule serves both EN and AR; glyphs drawn from borders (the
# checklist tick) keep physical sides so they never mirror.
--------------------------------------------------------------*/

:root {
  --cms-gold: var(--aports-base, #96722F);
  --cms-gold-light: var(--aports-base-light, #EFCB74);
  --cms-black: var(--aports-black, #000000);
  --cms-gray: var(--aports-gray, #87898e);
  --cms-cream: var(--aports-primary, #f4efeb);
  --cms-border: var(--aports-bdr-color, #e2dad3);
  --cms-ink: #1d1d1f;
  --cms-whatsapp: #1fa855;
  --cms-closed: #8a2a1f;
  --cms-shadow: 0 10px 60px rgba(0, 0, 0, 0.06);
}

/* Arabic letters join: never space them out or force capitals. */
[dir="rtl"] .cms-badge,
[dir="rtl"] .cms-field__label,
[dir="rtl"] .cms-seg__btn,
[dir="rtl"] .cms-card__type,
[dir="rtl"] .cms-detail__eyebrow,
[dir="rtl"] .cms-contact-card__label,
[dir="rtl"] .cms-btn,
[dir="rtl"] .cms-listing .thm-btn,
[dir="rtl"] .cms-detail-page .thm-btn,
[dir="rtl"] .cms-cta-btn {
  letter-spacing: 0;
  text-transform: none;
}

/* The template's back-to-top button turns its right arrow up with rotate(-90deg); rtl.css
   mirrors every .icon-right-arrow, which replaces the rotation and points it left. */
[dir="rtl"] .scroll-to-top i {
  transform: rotate(-90deg);
}

/*--------------------------------------------------------------
# 1. Shared
--------------------------------------------------------------*/
.cms-badges {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.cms-badges--inline {
  position: static;
  margin-bottom: 14px;
}

.cms-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--cms-black);
}

.cms-badge--sale {
  background-color: var(--cms-black);
  color: var(--cms-gold-light);
}

.cms-badge--rent {
  background-color: var(--cms-gold);
  color: #fff;
}

.cms-badge--reserved {
  background-color: var(--cms-gold-light);
  color: var(--cms-black);
}

.cms-badge--sold,
.cms-badge--rented {
  background-color: var(--cms-closed);
  color: #fff;
}

.cms-badge--draft {
  background-color: #fff;
  color: var(--cms-ink);
  outline: 1px dashed var(--cms-ink);
  outline-offset: -3px;
}

.cms-price {
  margin: 0;
  line-height: 1.3;
}

.cms-price__amount {
  font-weight: 700;
  color: var(--cms-black);
  unicode-bidi: isolate;
}

.cms-price__period {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--cms-gray);
  white-space: nowrap;
}

.cms-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--cms-ink);
}

.cms-stats li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cms-stats i {
  color: var(--cms-gold);
  font-size: 14px;
}

.cms-noimg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, var(--cms-cream), #e9e1d6);
  color: var(--cms-gold);
  font-size: 13px;
  font-weight: 600;
}

.cms-noimg i {
  font-size: 34px;
  opacity: 0.7;
}

.cms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease;
}

.cms-btn i {
  font-size: 16px;
}

.cms-btn--whatsapp {
  background-color: var(--cms-whatsapp);
  color: #fff;
}

.cms-btn--whatsapp:hover,
.cms-btn--whatsapp:focus-visible {
  background-color: #178a45;
  color: #fff;
}

.cms-btn--call {
  background-color: #fff;
  color: var(--cms-black);
}

.cms-btn--call:hover,
.cms-btn--call:focus-visible {
  background-color: var(--cms-gold-light);
  color: var(--cms-black);
}

.cms-btn--outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cms-btn--outline:hover,
.cms-btn--outline:focus-visible {
  border-color: var(--cms-gold-light);
  color: var(--cms-gold-light);
}

.cms-btn__meta {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.75;
}

.cms-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cms-gold);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cms-link-btn:hover {
  color: var(--cms-black);
}

.cms-btn:focus-visible,
.cms-link-btn:focus-visible,
.cms-seg__btn:focus-visible,
.cms-share:focus-visible,
.cms-gallery__main:focus-visible,
.cms-gallery__nav:focus-visible,
.cms-gallery__thumb:focus-visible,
.cms-lightbox button:focus-visible,
.cms-card a:focus-visible {
  outline: 2px solid var(--cms-gold);
  outline-offset: 3px;
}

.cms-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cms-cta-btn i {
  font-size: 16px;
}

/* Unavailable / empty / not found / no results */
.cms-state {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px;
  text-align: center;
}

.cms-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  border-radius: 50%;
  background-color: var(--cms-cream);
  color: var(--cms-gold);
  font-size: 28px;
}

.cms-state__title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.cms-state__text {
  margin-bottom: 26px;
}

.cms-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cms-state__actions .thm-btn,
.cms-state__actions .cms-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/*--------------------------------------------------------------
# 1b. Replaced template photos  img[data-cms-img][data-cms-overridden]
#
# cms.js marks an <img> whose photo was replaced from the dashboard.
# An upload rarely has the template's proportions, and a taller or
# wider photo breaks equal-height carousels, grids and the masonry
# gallery. Replaced photos keep the template image's ratio (taken
# from the built-in files) and are cropped to fill it. Built-in
# images are untouched.
--------------------------------------------------------------*/
.gallery-one__img img[data-cms-overridden],
.gallery-three__img img[data-cms-overridden],
.team-two__img img[data-cms-overridden],
.news-one__img img[data-cms-overridden],
.news-details__img img[data-cms-overridden],
.sidebar__post-image > img[data-cms-overridden],
.apartments-one__img > img[data-cms-overridden],
.feature-four__img img[data-cms-overridden],
.services-one__img img[data-cms-overridden],
.about-one__img-one img[data-cms-overridden],
.about-one__img-two img[data-cms-overridden],
.the-building__top-img img[data-cms-overridden],
.the-building__bottom-img img[data-cms-overridden],
.value__img img[data-cms-overridden],
.neighborhoods__img img[data-cms-overridden],
.contact-one__person-img img[data-cms-overridden],
img[data-cms-overridden][data-cms-img^="index.office."],
img[data-cms-overridden][data-cms-img^="about.office."] {
  object-fit: cover;
}

/* Square: office photos, the home gallery carousel, the round contact avatar */
.gallery-one__img img[data-cms-overridden],
.contact-one__person-img img[data-cms-overridden],
img[data-cms-overridden][data-cms-img^="index.office."],
img[data-cms-overridden][data-cms-img^="about.office."] {
  aspect-ratio: 1 / 1;
}

/* The Building masonry gallery: one tall tile, the rest near-square */
.gallery-three__img img[data-cms-overridden] {
  aspect-ratio: 378 / 407;
}

.gallery-three__img img[data-cms-overridden][data-cms-img="the-building.gallery.img2"] {
  aspect-ratio: 378 / 824;
}

.team-two__img img[data-cms-overridden] {
  aspect-ratio: 370 / 450;
}

.news-one__img img[data-cms-overridden],
.sidebar__post-image > img[data-cms-overridden] {
  aspect-ratio: 370 / 417;
}

.news-details__img img[data-cms-overridden] {
  aspect-ratio: 770 / 428;
}

.apartments-one__img > img[data-cms-overridden] {
  aspect-ratio: 419 / 532;
}

.feature-four__img img[data-cms-overridden] {
  aspect-ratio: 740 / 540;
}

.services-one__img img[data-cms-overridden] {
  aspect-ratio: 280 / 86;
}

.about-one__img-one img[data-cms-overridden] {
  aspect-ratio: 470 / 711;
}

/* The template sizes this one by its file (width: auto): pin it to the built-in width. */
.about-one__img-two img[data-cms-overridden] {
  width: 353px;
  max-width: 100%;
  aspect-ratio: 353 / 419;
}

.the-building__top-img img[data-cms-overridden],
.the-building__bottom-img img[data-cms-overridden] {
  aspect-ratio: 570 / 351;
}

.value__img img[data-cms-overridden] {
  aspect-ratio: 590 / 537;
}

.neighborhoods__img img[data-cms-overridden] {
  aspect-ratio: 770 / 520;
}

/*--------------------------------------------------------------
# 2. Home page featured cards (template: apartments-one)
--------------------------------------------------------------*/
.cms-feature-card .apartments-one__img > img {
  display: block;
  width: 100%;
  aspect-ratio: 419 / 532;
  object-fit: cover;
}

.cms-feature-card .apartments-one__img > .cms-noimg {
  aspect-ratio: 419 / 532;
  transition: box-shadow 500ms ease;
}

.cms-feature-card .cms-noimg > * {
  transition: opacity 500ms ease;
}

/* No photo: the hover text needs the dark ground a photo would give it, without the placeholder label under it. */
.cms-feature-card:hover .cms-noimg,
.cms-feature-card:focus-within .cms-noimg {
  box-shadow: inset 0 0 0 100vmax rgba(50, 52, 59, 0.6);
}

.cms-feature-card:hover .cms-noimg > *,
.cms-feature-card:focus-within .cms-noimg > * {
  opacity: 0;
}

.cms-feature-card.is-closed .apartments-one__img > img {
  filter: grayscale(0.7);
}

.cms-stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Long titles must wrap inside the card in both directions. */
.cms-feature-card .apartments-one__title-box,
.cms-feature-card .apartments-one__hover {
  inset-inline: 36px;
}

/* At most two lines, so a long title never climbs into the badges or off the top of the card. */
.cms-feature-card .apartments-one__title,
.cms-feature-card .apartments-one__hover-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* The clamp's "…" is drawn in the heading's colour, not the link's: keep it in step with the links. */
.cms-feature-card .apartments-one__title,
.cms-feature-card .apartments-one__hover-title {
  color: #fff;
}

.cms-feature-card .apartments-one__hover-title {
  transition: color 500ms ease;
}

.cms-feature-card .apartments-one__hover-title:has(> a:hover) {
  color: var(--cms-gold);
}

.cms-feature-card__price {
  margin-bottom: 6px;
  font-size: 15px;
}

.cms-feature-card__price .cms-price__amount {
  color: var(--cms-gold-light);
}

.cms-feature-card__price .cms-price__period {
  color: rgba(255, 255, 255, 0.75);
}

.cms-feature-card .apartments-one__hover .cms-feature-card__price {
  margin: 4px 0 0;
}

/* The template's 20px bottom padding would sit inside the clipped box and show half a 4th line. */
.cms-feature-card .apartments-one__hover-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-bottom: 0;
  margin-bottom: 20px;
}

@media (max-width: 575px) {
  .cms-feature-card .apartments-one__title-box,
  .cms-feature-card .apartments-one__hover {
    inset-inline: 24px;
  }
}

/*--------------------------------------------------------------
# 3. Listing page
--------------------------------------------------------------*/
.cms-intro-text {
  max-width: 640px;
  margin: 18px auto 0;
}

.cms-filters {
  margin-bottom: 26px;
  padding: 24px;
  background-color: #fff;
  box-shadow: var(--cms-shadow);
  border-top: 3px solid var(--cms-gold);
}

/* Segmented purpose switch */
.cms-seg {
  display: inline-flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 4px;
  background-color: var(--cms-cream);
}

.cms-seg__btn {
  min-height: 42px;
  padding: 8px 22px;
  border: 0;
  background: transparent;
  color: var(--cms-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 300ms ease, color 300ms ease;
}

.cms-seg__btn:hover {
  color: var(--cms-gold);
}

.cms-seg__btn.is-active {
  background-color: var(--cms-black);
  color: #fff;
}

.cms-filters__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Phone-width toggle for the four selects; from 768px they always show. */
.cms-filters__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border: 1px solid var(--cms-border);
  background-color: #fff;
  color: var(--cms-black);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cms-filters__toggle i {
  color: var(--cms-gold);
}

.cms-filters__toggle[aria-expanded="true"] {
  border-color: var(--cms-gold);
}

.cms-filters__toggle:focus-visible {
  outline: 2px solid var(--cms-gold);
  outline-offset: 2px;
}

.cms-filters__more {
  display: grid;
  gap: 16px;
}

.cms-filters__more.is-collapsed {
  display: none;
}

.cms-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.cms-field__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cms-gray);
}

.cms-input,
.cms-select {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding-block: 0;
  padding-inline: 16px;
  border: 1px solid transparent;
  border-radius: 0;
  background-color: var(--cms-cream);
  color: var(--cms-black);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.cms-input:focus,
.cms-select:focus {
  border-color: var(--cms-gold);
  background-color: #fff;
}

.cms-select {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2396722F' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

[dir="rtl"] .cms-select {
  background-position: left 16px center;
}

.cms-input-wrap {
  position: relative;
  display: block;
}

.cms-input-wrap > i {
  position: absolute;
  top: 50%;
  inset-inline-start: 16px;
  transform: translateY(-50%);
  color: var(--cms-gold);
  font-size: 14px;
  pointer-events: none;
}

.cms-input-wrap .cms-input {
  padding-inline-start: 42px;
}

.cms-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.cms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}

.cms-toolbar__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
}

.cms-toolbar__count {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--cms-black);
}

.cms-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cms-gray);
  white-space: nowrap;
}

.cms-toolbar__sort .cms-select {
  width: auto;
  min-width: 210px;
  height: 46px;
  background-color: #fff;
  border-color: var(--cms-border);
}

/* Listing card (template: apartments-two) */
.cms-card {
  display: flex;
  flex-direction: column;
  height: calc(100% - 30px);
  background-color: #fff;
  box-shadow: var(--cms-shadow);
}

.cms-card__media {
  display: block;
}

.cms-card__media img {
  display: block;
  object-fit: cover;
}

.cms-card__media img,
.cms-card__media .cms-noimg {
  width: 100%;
  aspect-ratio: 370 / 280;
}

.cms-card.is-closed .cms-card__media img {
  filter: grayscale(0.7);
}

.apartments-two__content.cms-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 22px 26px 24px;
  box-shadow: none;
}

.cms-card__type {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cms-gold);
}

.cms-card .apartments-two__title {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.cms-card__location {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 22px;
}

.cms-card__location i {
  margin-top: 4px;
  color: var(--cms-gold);
  font-size: 13px;
}

.cms-card .cms-stats {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--cms-border);
}

.cms-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: auto;
}

/* A long rent price wraps its period under the amount instead of pushing the button
   to a second line, so every card in a row keeps price and button side by side. */
.cms-card__price {
  flex: 1 1 0;
  font-size: 18px;
}

.cms-card__price .cms-price__amount {
  white-space: nowrap;
}

.cms-card .cms-card__foot .apartments-two__btn {
  flex: none;
}

.cms-card__price .cms-price__amount {
  color: var(--cms-gold);
}

.cms-card .apartments-two__btn {
  padding: 4px 22px;
}

/*--------------------------------------------------------------
# 4. Property details
--------------------------------------------------------------*/
.cms-detail-page {
  position: relative;
  display: block;
  padding: 80px 0 60px;
}

/* Gallery */
.cms-gallery {
  margin-bottom: 44px;
}

.cms-gallery__stage {
  position: relative;
  overflow: hidden;
  background-color: var(--cms-cream);
}

.cms-gallery__main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.cms-gallery__main img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 640px;
  object-fit: cover;
}

/* Same frame as a photo; keeps .cms-noimg's flex layout so the icon and label stay centred. */
.cms-gallery--empty .cms-noimg {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 640px;
}

.cms-gallery__zoom {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  transition: background-color 300ms ease;
}

.cms-gallery__main:hover .cms-gallery__zoom {
  background-color: var(--cms-gold);
}

.cms-gallery__counter {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 18px;
  padding: 6px 14px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
}

.cms-gallery__nav {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--cms-black);
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background-color 300ms ease, color 300ms ease;
}

.cms-gallery__nav:hover {
  background-color: var(--cms-gold);
  color: #fff;
}

.cms-gallery__nav--prev {
  inset-inline-start: 18px;
}

.cms-gallery__nav--next {
  inset-inline-end: 18px;
}

.cms-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cms-gallery__thumb {
  flex: 0 0 auto;
  width: 112px;
  padding: 0;
  border: 0;
  background: none;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.cms-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cms-gallery__thumb:hover,
.cms-gallery__thumb.is-active {
  opacity: 1;
}

.cms-gallery__thumb.is-active {
  box-shadow: inset 0 -3px 0 var(--cms-gold);
}

.cms-gallery__thumb.is-active img {
  outline: 2px solid var(--cms-gold);
  outline-offset: -2px;
}

/* Main column */
.cms-detail__head {
  margin-bottom: 36px;
}

.cms-detail__eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cms-gold);
}

.cms-detail__title {
  margin-bottom: 12px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cms-detail__location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  margin-bottom: 18px;
  font-size: 15px;
}

.cms-detail__place {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.cms-detail__place i,
.cms-map-link i {
  color: var(--cms-gold);
}

.cms-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cms-black);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--cms-gold);
  text-underline-offset: 4px;
}

.cms-map-link:hover {
  color: var(--cms-gold);
}

.cms-detail__price {
  margin-bottom: 18px;
  font-size: 30px;
}

.cms-detail__price .cms-price__amount {
  color: var(--cms-gold);
}

.cms-detail__head .cms-stats {
  font-size: 15px;
  gap: 8px 26px;
}

.cms-block {
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--cms-border);
}

.cms-block__title {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.cms-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.cms-fact {
  padding: 16px 18px;
  background-color: var(--cms-cream);
}

.cms-fact dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--cms-gray);
}

.cms-fact dt i {
  width: 16px;
  color: var(--cms-gold);
  text-align: center;
}

.cms-fact dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cms-black);
  overflow-wrap: anywhere;
}

.cms-detail__text p {
  margin-bottom: 16px;
  white-space: pre-line;
}

.cms-detail__text p:last-child {
  margin-bottom: 0;
}

.cms-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
}

.cms-checklist li {
  position: relative;
  padding-inline-start: 32px;
  color: var(--cms-ink);
  line-height: 26px;
}

.cms-checklist li::before {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--cms-cream);
}

/* A tick drawn from two borders: physical sides on purpose, it must not mirror in RTL. */
.cms-checklist li::after {
  content: "";
  position: absolute;
  top: 8px;
  inset-inline-start: 7px;
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--cms-gold);
  border-bottom: 2px solid var(--cms-gold);
  transform: rotate(45deg);
}

/* Contact card. The template's .page-wrapper { overflow: hidden } makes it a scroll container,
   which stops position: sticky; on the detail page it clips instead (same clipping, no scroll
   container), and flow-root keeps the block formatting context hidden gave it. */
.page-wrapper.cms-detail-wrapper {
  display: flow-root;
  overflow: clip;
}

.cms-contact-card {
  position: sticky;
  top: 110px;
  margin-top: 40px;
  padding: 30px 28px;
  background-color: var(--cms-black);
  color: rgba(255, 255, 255, 0.72);
}

.cms-contact-card__label {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.cms-contact-card__price {
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 26px;
}

.cms-contact-card__price .cms-price__amount {
  color: var(--cms-gold-light);
}

.cms-contact-card__price .cms-price__period {
  color: rgba(255, 255, 255, 0.6);
}

.cms-contact-card__title {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.cms-contact-card__text {
  margin-bottom: 22px;
  font-size: 15px;
  line-height: 26px;
}

.cms-contact-card__actions {
  display: grid;
  gap: 10px;
}

.cms-contact-card__actions .cms-btn,
.cms-contact-card__actions .thm-btn {
  width: 100%;
}

.cms-btn--viewing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 22px;
}

.cms-btn--viewing:hover {
  color: var(--cms-black);
}

.cms-btn--viewing:before {
  background: #fff;
}

.cms-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cms-share:hover {
  color: var(--cms-gold-light);
}

/* Similar properties */
.cms-similar {
  padding-top: 90px;
}

/* Mobile quick actions (WhatsApp + call), pinned to the bottom edge */
.cms-mobilebar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 98;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background-color: #fff;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

.cms-mobilebar .cms-btn {
  min-height: 46px;
  padding: 8px 12px;
}

.cms-mobilebar .cms-btn--call {
  background-color: var(--cms-black);
  color: #fff;
}

.cms-has-mobilebar .site-footer {
  padding-bottom: 66px;
}

.cms-has-mobilebar .scroll-to-top {
  bottom: 86px;
}

/*--------------------------------------------------------------
# Breakpoints (mobile-first)
--------------------------------------------------------------*/
@media (min-width: 576px) {
  .cms-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .cms-filters__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cms-filters__toggle {
    display: none;
  }

  /* The selects join the parent grid directly. */
  .cms-filters__more,
  .cms-filters__more.is-collapsed {
    display: contents;
  }

  .cms-field--search {
    grid-column: 1 / -1;
  }

  .cms-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .cms-contact-card {
    margin-top: 0;
  }

  .cms-mobilebar {
    display: none;
  }

  .cms-has-mobilebar .site-footer {
    padding-bottom: 0;
  }

  .cms-has-mobilebar .scroll-to-top {
    bottom: 40px;
  }
}

@media (min-width: 1200px) {
  .cms-filters {
    padding: 28px 30px;
  }

  .cms-filters__grid {
    grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  }

  .cms-field--search {
    grid-column: auto;
  }

  .cms-detail__title {
    font-size: 40px;
  }
}

@media (max-width: 767px) {
  .cms-detail-page {
    padding-top: 40px;
  }

  .cms-gallery {
    margin-bottom: 30px;
  }

  .cms-gallery__main img,
  .cms-gallery--empty .cms-noimg {
    aspect-ratio: 4 / 3;
  }

  .cms-gallery__thumb {
    width: 84px;
  }

  .cms-gallery__nav {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .cms-detail__title {
    font-size: 28px;
  }

  .cms-detail__price {
    font-size: 26px;
  }

  .cms-filters {
    padding: 18px 16px;
  }

  .cms-seg {
    display: flex;
  }

  .cms-seg__btn {
    flex: 1 1 0;
    padding-inline: 10px;
  }

  .cms-toolbar__sort {
    width: 100%;
  }

  .cms-toolbar__sort .cms-select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cms-similar {
    padding-top: 60px;
  }

  .cms-similar .section-title__title {
    font-size: 32px;
    line-height: 42px;
  }

  .cms-state {
    padding: 36px 8px;
  }
}

/* Long property titles in the inner-page banner */
.page-header__inner h2[data-cms-property-title] {
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .page-header__inner h2[data-cms-property-title] {
    font-size: 30px;
    line-height: 40px;
  }
}

/*--------------------------------------------------------------
# 5. Lightbox
--------------------------------------------------------------*/
html.cms-lightbox-open,
html.cms-lightbox-open body {
  overflow: hidden;
}

.cms-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
  background-color: rgba(0, 0, 0, 0.92);
  animation: cms-fade-in 200ms ease-out;
}

.cms-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  margin: 0;
}

.cms-lightbox__img {
  display: block;
  max-width: min(100%, 1400px);
  max-height: calc(100% - 40px);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cms-lightbox__counter {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.cms-lightbox__close,
.cms-lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.cms-lightbox__close:hover,
.cms-lightbox__nav:hover {
  background-color: var(--cms-gold);
}

.cms-lightbox__close {
  top: 16px;
  inset-inline-end: 16px;
}

.cms-lightbox__nav {
  top: 50%;
  margin-top: -26px;
}

.cms-lightbox__nav--prev {
  inset-inline-start: 16px;
}

.cms-lightbox__nav--next {
  inset-inline-end: 16px;
}

@media (max-width: 767px) {
  .cms-lightbox__nav {
    top: auto;
    bottom: 14px;
    margin-top: 0;
  }
}

@keyframes cms-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/*--------------------------------------------------------------
# 6. Dashboard preview (?cms_preview=1 inside the dashboard iframe)
--------------------------------------------------------------*/
html.cms-preview .cms-hover {
  outline: 2px dashed var(--cms-gold);
  outline-offset: 2px;
  cursor: pointer;
}

html.cms-preview [data-cms-img].cms-hover,
html.cms-preview [data-cms-prop-id].cms-hover {
  outline-offset: -4px;
}

html.cms-preview .cms-flash {
  animation: cms-flash 1.6s ease-out;
}

@keyframes cms-flash {
  0%, 55% {
    outline: 3px solid var(--cms-gold-light);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(150, 114, 47, 0.35);
  }
  100% {
    outline: 3px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(150, 114, 47, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cms-lightbox,
  html.cms-preview .cms-flash {
    animation: none;
  }
}
