/* Public listing detail — /ads/<id>/ */

.ad-page {
  padding-bottom: 4rem;
}

.ad-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--afram-text-muted, #94a3b8);
}

.ad-breadcrumb a {
  color: var(--afram-accent, #38bdf8);
  text-decoration: none;
}

.ad-breadcrumb a:hover {
  text-decoration: underline;
}

.ad-breadcrumb__sep {
  opacity: 0.45;
}

.ad-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.ad-head__main {
  flex: 1 1 18rem;
  min-width: 0;
}

.ad-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--afram-accent, #38bdf8);
}

.ad-head__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2.05rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--afram-text, inherit);
}

.ad-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--afram-text-muted, #94a3b8);
}

.ad-head__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.ad-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ad-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  gap: 1.15rem;
  align-items: start;
}

.ad-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.ad-sidebar {
  display: grid;
  gap: 0.85rem;
  position: sticky;
  top: 5.25rem;
  align-self: start;
}

.ad-gallery {
  position: relative;
  min-height: 0;
  border-radius: 1.25rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.ad-gallery .amlaki-gallery > img,
.ad-gallery > img {
  height: clamp(240px, 42vw, 440px);
  cursor: zoom-in;
}

.ad-gallery__badges {
  position: absolute;
  top: 0.85rem;
  inset-inline: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
  z-index: 2;
}

.ad-gallery__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.ad-gallery__badge--deal {
  background: rgba(14, 165, 233, 0.88);
  color: #fff;
}

.ad-gallery__badge--type {
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
}

.ad-gallery__hint {
  position: absolute;
  bottom: 4.5rem;
  inset-inline-start: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 2;
}

.ad-gallery__count {
  position: absolute;
  bottom: 0.85rem;
  inset-inline-start: 0.85rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}

.ad-gallery .amlaki-gallery__thumbs {
  padding: 0.65rem 0.75rem 0.75rem;
  background: color-mix(in srgb, var(--afram-surface, #fff) 92%, transparent);
  border-top: 1px solid var(--afram-border, rgba(255, 255, 255, 0.08));
}

.ad-gallery .amlaki-gallery__thumbs img {
  width: 84px;
  height: 62px;
  border-radius: 0.65rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
  opacity: 0.78;
}

.ad-gallery .amlaki-gallery__thumbs img:hover,
.ad-gallery .amlaki-gallery__thumbs img.is-active {
  opacity: 1;
  border-color: var(--afram-accent, #38bdf8);
  transform: translateY(-1px);
}

.ad-card {
  background: var(--afram-surface, var(--home-surface, rgba(12, 20, 34, 0.78)));
  border: 1px solid var(--afram-border, var(--home-line, rgba(255, 255, 255, 0.09)));
  border-radius: 1.15rem;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--afram-shadow, none);
}

.ad-card__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--afram-text, inherit);
}

.ad-card__title i {
  color: var(--afram-accent, #38bdf8);
  font-size: 1rem;
}

.ad-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--afram-text, inherit);
  white-space: pre-line;
}

.ad-price-card {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--afram-accent, #0ea5e9) 14%, var(--afram-surface, #0f172a)),
    var(--afram-surface, var(--home-surface, rgba(12, 20, 34, 0.78)))
  );
  border: 1px solid color-mix(in srgb, var(--afram-accent, #0ea5e9) 22%, transparent);
  border-radius: 1.15rem;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.ad-price-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--afram-text-muted, #94a3b8);
  margin-bottom: 0.15rem;
}

.ad-price-card__value {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--afram-text, inherit);
}

.ad-price-card__unit {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--afram-text-muted, #94a3b8);
  margin-inline-start: 0.25rem;
}

.ad-price-card__row + .ad-price-card__row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--afram-border, rgba(127, 127, 127, 0.2));
}

.ad-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.ad-spec {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.85rem;
  border: 1px solid var(--afram-border, rgba(127, 127, 127, 0.18));
  background: var(--afram-surface-2, rgba(255, 255, 255, 0.03));
}

.ad-spec__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--afram-accent, #0ea5e9) 12%, transparent);
  color: var(--afram-accent, #38bdf8);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.ad-spec__body small {
  display: block;
  font-size: 0.68rem;
  color: var(--afram-text-muted, #94a3b8);
}

.ad-spec__body strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.ad-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ad-amenity {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid var(--afram-border, rgba(127, 127, 127, 0.18));
  background: var(--afram-surface-2, transparent);
  color: var(--afram-text, inherit);
}

.ad-amenity i {
  color: var(--afram-accent, #38bdf8);
  font-size: 0.82rem;
}

.ad-cta {
  display: grid;
  gap: 0.55rem;
}

.ad-cta__note {
  margin: 0 0 0.15rem;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--afram-text-muted, #94a3b8);
  text-align: center;
}

.ad-cta .btn {
  min-height: 2.75rem;
  font-weight: 800;
}

.ad-map-wrap .amlaki-map {
  border-radius: 0.85rem;
  overflow: hidden;
  min-height: 260px;
}

.ad-similar {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--afram-border, rgba(127, 127, 127, 0.15));
}

.ad-similar__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ad-similar__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.ad-similar__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.ad-share-btn.copied {
  border-color: #10b981 !important;
  color: #10b981 !important;
}

html[data-theme="light"] .ad-card,
html[data-theme="light"] .ad-price-card {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .ad-price-card {
  background: linear-gradient(145deg, #f0f9ff, #fff);
}

html[data-theme="light"] .ad-spec {
  background: #f8fafc;
}

html[data-theme="light"] .ad-gallery .amlaki-gallery__thumbs {
  background: #fff;
  border-top-color: #e2e8f0;
}

@media (max-width: 991px) {
  .ad-layout {
    grid-template-columns: 1fr;
  }

  .ad-sidebar {
    position: static;
    order: -1;
  }

  .ad-similar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ad-head__actions {
    width: 100%;
  }

  .ad-head__actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .ad-gallery .amlaki-gallery > img,
  .ad-gallery > img {
    height: clamp(220px, 56vw, 320px);
  }

  .ad-gallery__hint {
    display: none;
  }

  .ad-similar__grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}
