.mh-models-scope{width:100%;position:relative;isolation:isolate;display:block;overflow:hidden}
    .mh-models-scope {
      --navy: #020817;
      --navy-2: #00133f;
      --navy-3: #061a3b;
      --blue: #168ed0;
      --blue-dark: #0860a8;
      --sky: #7ee3ff;
      --white: #ffffff;
      --text: #eef8ff;
      --muted: rgba(238, 248, 255, 0.72);
      --line: rgba(126, 227, 255, 0.18);
      --panel: rgba(255, 255, 255, 0.045);
      --poster-ratio: 1017 / 1546;
      --card-w: clamp(112px, 12vw, 230px);
    }

    .mh-models-scope, .mh-models-scope * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    .mh-models-scope {
      scroll-behavior: smooth;
      background: var(--navy);
    }

    .mh-models-scope {
      min-width: 320px;
      min-height: 100vh;
      overflow-x: hidden;
      color: var(--text);
      background: var(--navy);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    }

    .mh-models-scope button,
    .mh-models-scope a {
      font: inherit;
    }

    .mh-models-scope button {
      border: 0;
    }

    .mh-models-scope img {
      display: block;
      max-width: 100%;
    }

    .mh-models-scope .app-view[hidden] {
      display: none !important;
    }

    /* =========================
       صفحة النماذج الرئيسية
       ========================= */
    .mh-models-scope .apartment-models-section {
      position: relative;
      width: 100%;
      min-height: 100vh;
      overflow: hidden;
      display: grid;
      place-items: center;
      isolation: isolate;
      perspective: 1600px;
      user-select: none;
      background:
        radial-gradient(circle at 50% 42%, rgba(22, 142, 208, 0.14), transparent 37%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 50%, var(--navy) 100%);
    }

    .mh-models-scope .apartment-models-section::before,
    .mh-models-scope .apartment-models-section::after {
      content: "";
      position: absolute;
      z-index: -1;
      width: 340px;
      height: 340px;
      border-radius: 50%;
      filter: blur(80px);
      opacity: 0.16;
      pointer-events: none;
    }

    .mh-models-scope .apartment-models-section::before {
      top: -160px;
      right: -80px;
      background: var(--blue);
    }

    .mh-models-scope .apartment-models-section::after {
      bottom: -190px;
      left: -100px;
      background: var(--sky);
    }

    .mh-models-scope .hero-header {
      position: absolute;
      top: clamp(15px, 2.6vh, 27px);
      left: 50%;
      z-index: 20;
      width: min(980px, calc(100vw - 24px));
      transform: translateX(-50%);
      display: grid;
      gap: 10px;
      pointer-events: none;
    }

    .mh-models-scope .hero-title-row {
      display: flex;
      align-items: center;
      gap: clamp(10px, 2vw, 24px);
    }

    .mh-models-scope .hero-line {
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(126, 227, 255, 0.55), transparent);
    }

    .mh-models-scope .hero-title {
      padding: 10px 25px;
      border: 1px solid rgba(126, 227, 255, 0.22);
      border-radius: 17px;
      color: var(--white);
      background: rgba(0, 24, 80, 0.72);
      box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26), inset 0 0 16px rgba(126, 227, 255, 0.04);
      backdrop-filter: blur(12px);
      font-size: clamp(17px, 1.6vw, 27px);
      font-weight: 950;
      white-space: nowrap;
    }

    .mh-models-scope .branch-tabs-shell {
      display: flex;
      justify-content: center;
      pointer-events: auto;
    }

    .mh-models-scope .branch-tabs {
      max-width: calc(100vw - 22px);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 6px;
      overflow-x: auto;
      border: 1px solid rgba(126, 227, 255, 0.15);
      border-radius: 999px;
      background: rgba(1, 15, 43, 0.72);
      box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(14px);
      scrollbar-width: none;
    }

    .mh-models-scope .branch-tabs::-webkit-scrollbar {
      display: none;
    }

    .mh-models-scope .branch-tab {
      min-width: max-content;
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 7px 14px;
      border: 1px solid transparent;
      border-radius: 999px;
      color: rgba(238, 248, 255, 0.72);
      background: transparent;
      cursor: pointer;
      font-size: clamp(11px, 0.83vw, 13px);
      font-weight: 900;
      transition: 220ms ease;
    }

    .mh-models-scope .branch-tab:hover {
      color: var(--white);
      background: rgba(126, 227, 255, 0.08);
    }

    .mh-models-scope .branch-tab.is-active {
      color: #031528;
      border-color: rgba(255, 255, 255, 0.5);
      background: linear-gradient(135deg, var(--sky), #43b9ed);
      box-shadow: 0 9px 18px rgba(22, 142, 208, 0.26);
    }

    .mh-models-scope .branch-count {
      min-width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      padding-inline: 5px;
      border-radius: 999px;
      color: inherit;
      background: rgba(255, 255, 255, 0.2);
      font-size: 10px;
      font-weight: 950;
    }

    .mh-models-scope .carousel-stage {
      position: relative;
      width: 100%;
      min-height: 100vh;
    }

    .mh-models-scope .carousel {
      position: relative;
      width: 100%;
      min-height: 100vh;
      cursor: grab;
      touch-action: pan-y;
      transform-style: preserve-3d;
    }

    .mh-models-scope .carousel.is-dragging {
      cursor: grabbing;
    }

    .mh-models-scope .carousel.is-dragging .slide,
    .mh-models-scope .carousel.is-dragging .slide img {
      transition: none !important;
    }

    .mh-models-scope .slide {
      position: absolute;
      top: 52%;
      left: 50%;
      width: var(--card-w);
      aspect-ratio: var(--slide-ratio, var(--poster-ratio));
      overflow: hidden;
      border: 1px solid rgba(126, 227, 255, 0.22);
      border-radius: 13px;
      background: #041228;
      box-shadow: 0 30px 55px rgba(0, 0, 0, 0.78), 0 0 14px rgba(22, 142, 208, 0.16);
      transform-style: preserve-3d;
      will-change: transform, opacity, filter;
      transition:
        transform 850ms cubic-bezier(0.18, 0.75, 0.18, 1),
        opacity 850ms ease,
        filter 850ms ease,
        box-shadow 850ms ease,
        border-color 850ms ease;
    }

    .mh-models-scope .slide.is-active {
      border-color: rgba(126, 227, 255, 0.82);
      box-shadow:
        0 38px 68px rgba(0, 0, 0, 0.82),
        0 0 0 1px rgba(126, 227, 255, 0.24),
        0 0 30px rgba(22, 142, 208, 0.24);
    }

    .mh-models-scope .slide::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%, rgba(0, 8, 23, 0.72) 100%);
      pointer-events: none;
    }

    .mh-models-scope .slide img,
    .mh-models-scope .main-preview img,
    .mh-models-scope .thumb img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      pointer-events: none;
    }

    /* صور تجريبية حقيقية: ملء بطاقات النماذج والصور المصغرة بدون فراغات */
    .mh-models-scope .slide img,
    .mh-models-scope .thumb img {
      object-fit: cover;
    }

    .mh-models-scope .branch-badge {
      position: absolute;
      top: 7px;
      right: 7px;
      z-index: 3;
      min-height: 25px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 8px;
      border: 1px solid rgba(126, 227, 255, 0.2);
      border-radius: 999px;
      color: var(--white);
      background: rgba(0, 18, 52, 0.79);
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
      backdrop-filter: blur(10px);
      font-size: clamp(8px, 0.65vw, 10px);
      font-weight: 900;
      line-height: 1;
    }

    .mh-models-scope .branch-badge::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--sky);
      box-shadow: 0 0 8px rgba(126, 227, 255, 0.75);
    }

    .mh-models-scope .slide-content {
      position: absolute;
      right: 7px;
      bottom: 8px;
      left: 7px;
      z-index: 2;
      display: grid;
      gap: 7px;
    }

    .mh-models-scope .apartment-name {
      min-height: 32px;
      display: grid;
      place-items: center;
      padding: 7px 9px;
      border-radius: 12px;
      color: var(--white);
      background: rgba(0, 18, 52, 0.82);
      backdrop-filter: blur(10px);
      font-size: clamp(10px, 0.8vw, 13px);
      font-weight: 950;
      line-height: 1.25;
      text-align: center;
    }

    .mh-models-scope .more-btn {
      min-height: 32px;
      border-radius: 999px;
      color: var(--white);
      background: linear-gradient(135deg, var(--sky), var(--blue));
      box-shadow: 0 10px 18px rgba(0, 0, 0, 0.34);
      cursor: pointer;
      font-size: clamp(9px, 0.72vw, 12px);
      font-weight: 950;
      transition: transform 220ms ease, filter 220ms ease;
    }

    .mh-models-scope .more-btn:hover {
      transform: translateY(-2px);
      filter: brightness(1.08);
    }

    .mh-models-scope .branch-summary {
      position: absolute;
      right: 50%;
      bottom: clamp(54px, 7vh, 76px);
      z-index: 15;
      width: min(620px, calc(100vw - 28px));
      transform: translateX(50%);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: rgba(238, 248, 255, 0.74);
      font-size: clamp(11px, 0.82vw, 13px);
      font-weight: 800;
      text-align: center;
      pointer-events: none;
    }

    .mh-models-scope .branch-summary strong {
      color: var(--white);
      font-weight: 950;
    }

    .mh-models-scope .swipe-hint {
      position: absolute;
      left: 50%;
      bottom: clamp(14px, 2.3vh, 24px);
      z-index: 15;
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      transform: translateX(-50%);
      border: 1px solid rgba(126, 227, 255, 0.18);
      border-radius: 999px;
      color: rgba(238, 248, 255, 0.78);
      background: rgba(0, 24, 80, 0.58);
      box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
      backdrop-filter: blur(12px);
      font-size: clamp(11px, 0.85vw, 13px);
      font-weight: 850;
      white-space: nowrap;
      pointer-events: none;
    }

    .mh-models-scope .swipe-hint-icon {
      width: 22px;
      height: 22px;
      display: inline-grid;
      place-items: center;
      border-radius: 50%;
      color: #04111e;
      background: linear-gradient(135deg, var(--sky), var(--white));
      font-size: 15px;
      animation: swipeNudge 1.8s ease-in-out infinite;
    }

    @keyframes swipeNudge {
      0%, 100% { transform: translateX(0); }
      50% { transform: translateX(-4px); }
    }

    /* =========================
       صفحة التفاصيل الكاملة
       ========================= */
    .mh-models-scope .details-page {
      min-height: 100vh;
      padding: clamp(18px, 3vw, 38px);
      background:
        radial-gradient(circle at 82% 10%, rgba(22, 142, 208, 0.17), transparent 30%),
        radial-gradient(circle at 12% 92%, rgba(126, 227, 255, 0.08), transparent 32%),
        linear-gradient(145deg, #031027, var(--navy) 58%, #00143b);
    }

    .mh-models-scope .details-container {
      width: min(1180px, 100%);
      margin-inline: auto;
    }

    .mh-models-scope .details-topbar {
      position: sticky;
      top: 12px;
      z-index: 30;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: clamp(18px, 2.5vw, 30px);
      padding: 10px;
      border: 1px solid rgba(126, 227, 255, 0.13);
      border-radius: 21px;
      background: rgba(2, 15, 39, 0.82);
      box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
      backdrop-filter: blur(16px);
    }

    .mh-models-scope .back-btn {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 10px 17px;
      border: 1px solid rgba(126, 227, 255, 0.24);
      border-radius: 14px;
      color: var(--white);
      background: rgba(255, 255, 255, 0.055);
      cursor: pointer;
      font-weight: 950;
      transition: 220ms ease;
    }

    .mh-models-scope .back-btn:hover {
      transform: translateX(3px);
      background: rgba(126, 227, 255, 0.11);
    }

    .mh-models-scope .back-icon {
      font-size: 19px;
      line-height: 1;
    }

    .mh-models-scope .topbar-branch {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 15px;
      border-radius: 14px;
      color: var(--white);
      background: linear-gradient(135deg, rgba(22, 142, 208, 0.26), rgba(126, 227, 255, 0.08));
      font-size: 13px;
      font-weight: 900;
    }

    .mh-models-scope .topbar-branch::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--sky);
      box-shadow: 0 0 10px rgba(126, 227, 255, 0.75);
    }

    .mh-models-scope .details-grid {
      display: grid;
      grid-template-columns: minmax(420px, 54%) minmax(320px, 1fr);
      grid-template-areas:
        "visual info"
        "actions info";
      gap: clamp(20px, 2.8vw, 42px);
      align-items: start;
    }

    .mh-models-scope .details-visual {
      grid-area: visual;
      display: grid;
      gap: 16px;
    }

    .mh-models-scope .details-info {
      grid-area: info;
      display: grid;
      align-content: start;
      gap: clamp(16px, 2vw, 24px);
    }

    .mh-models-scope .details-actions {
      grid-area: actions;
    }

    .mh-models-scope .details-panel {
      border: 1px solid rgba(126, 227, 255, 0.15);
      background: rgba(255, 255, 255, 0.043);
      box-shadow: inset 0 0 22px rgba(126, 227, 255, 0.025), 0 22px 46px rgba(0, 0, 0, 0.16);
    }

    .mh-models-scope .details-image-card {
      width: 100%;
      padding: clamp(10px, 1.35vw, 15px);
      border-radius: 30px;
    }

    .mh-models-scope .main-preview {
      position: relative;
      width: 100%;
      height: min(67vh, 690px);
      max-height: min(67vh, 690px);
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 24px;
      background: #06162d;
    }

    .mh-models-scope .main-preview::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      background-image: var(--main-bg-image);
      background-position: center;
      background-size: cover;
      filter: blur(30px) saturate(1.12) brightness(0.78);
      transform: scale(1.18);
      opacity: 0.68;
      transition: opacity 260ms ease, background-image 260ms ease;
    }

    .mh-models-scope .main-preview::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      background: radial-gradient(circle at 50% 48%, transparent 35%, rgba(1, 8, 23, 0.18) 100%);
      pointer-events: none;
    }

    .mh-models-scope .main-preview img {
      position: relative;
      z-index: 2;
      object-fit: contain;
      transition: opacity 320ms ease, transform 420ms cubic-bezier(0.18, 0.75, 0.18, 1), filter 320ms ease;
    }

    .mh-models-scope .main-preview.is-switching img {
      opacity: 0;
      transform: scale(0.96) translateY(8px);
      filter: blur(8px);
    }

    .mh-models-scope .main-image-label {
      position: absolute;
      right: 16px;
      bottom: 17px;
      left: 16px;
      z-index: 3;
      min-height: 38px;
      display: grid;
      place-items: center;
      padding: 9px 16px;
      border: 1px solid rgba(126, 227, 255, 0.22);
      border-radius: 999px;
      color: var(--white);
      background: rgba(0, 18, 52, 0.78);
      box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
      backdrop-filter: blur(12px);
      font-size: clamp(12px, 0.95vw, 14px);
      font-weight: 950;
      text-align: center;
    }

    .mh-models-scope .details-title-card {
      display: grid;
      gap: 15px;
      padding: clamp(19px, 2.2vw, 29px);
      border-radius: 27px;
    }

    .mh-models-scope .details-branch-line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: var(--sky);
      font-size: 13px;
      font-weight: 950;
    }

    .mh-models-scope .details-branch-line::after {
      content: "";
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, rgba(126, 227, 255, 0.35), transparent);
    }

    .mh-models-scope .details-title {
      color: var(--white);
      font-size: clamp(29px, 3vw, 45px);
      font-weight: 950;
      line-height: 1.12;
      letter-spacing: -0.03em;
      text-wrap: balance;
    }

    .mh-models-scope .details-desc {
      color: var(--muted);
      font-size: clamp(14px, 1vw, 16px);
      line-height: 1.95;
    }

    .mh-models-scope .unit-meta {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .mh-models-scope .meta-item {
      min-height: 58px;
      display: grid;
      gap: 4px;
      padding: 12px 14px;
      border: 1px solid rgba(126, 227, 255, 0.11);
      border-radius: 17px;
      background: rgba(0, 18, 52, 0.45);
    }

    .mh-models-scope .meta-label {
      color: rgba(238, 248, 255, 0.52);
      font-size: 11px;
      font-weight: 800;
    }

    .mh-models-scope .meta-value {
      color: var(--white);
      font-size: 14px;
      font-weight: 950;
    }

    .mh-models-scope .gallery-shell {
      padding: clamp(14px, 1.55vw, 20px);
      border-radius: 26px;
    }

    .mh-models-scope .gallery-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .mh-models-scope .gallery-title {
      color: var(--white);
      font-size: 15px;
      font-weight: 950;
    }

    .mh-models-scope .gallery-hint {
      color: rgba(238, 248, 255, 0.52);
      font-size: 12px;
      font-weight: 800;
    }

    .mh-models-scope .gallery-row {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: clamp(8px, 1vw, 12px);
    }

    .mh-models-scope .thumb {
      position: relative;
      aspect-ratio: var(--thumb-ratio, var(--poster-ratio));
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.13);
      border-radius: 17px;
      background: #07182e;
      cursor: pointer;
      opacity: 0.72;
      transition: 220ms ease;
    }

    .mh-models-scope .thumb:hover,
    .mh-models-scope .thumb.is-selected {
      transform: translateY(-3px);
      border-color: rgba(126, 227, 255, 0.82);
      opacity: 1;
      box-shadow: 0 12px 20px rgba(0, 0, 0, 0.22);
    }

    .mh-models-scope .thumb-label {
      position: absolute;
      right: 5px;
      bottom: 5px;
      left: 5px;
      z-index: 2;
      min-height: 23px;
      display: grid;
      place-items: center;
      padding: 4px 5px;
      border: 1px solid rgba(126, 227, 255, 0.13);
      border-radius: 9px;
      color: var(--white);
      background: rgba(0, 18, 52, 0.78);
      backdrop-filter: blur(8px);
      font-size: clamp(8px, 0.67vw, 10px);
      font-weight: 900;
      line-height: 1.15;
      text-align: center;
    }

    .mh-models-scope .details-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 13px;
      padding: 14px;
      border-radius: 26px;
    }

    .mh-models-scope .cta {
      position: relative;
      min-height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 14px 17px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 20px;
      color: var(--white);
      text-decoration: none;
      box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
      transition: transform 240ms ease, box-shadow 240ms ease;
    }

    .mh-models-scope .cta::before {
      content: "";
      position: absolute;
      inset: 1px;
      border-radius: inherit;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02));
      pointer-events: none;
    }

    .mh-models-scope .cta > * {
      position: relative;
      z-index: 1;
    }

    .mh-models-scope .cta:hover {
      transform: translateY(-4px);
      box-shadow: 0 22px 36px rgba(0, 0, 0, 0.28);
    }

    .mh-models-scope .cta-primary {
      background: linear-gradient(135deg, #48b7ff, var(--blue) 58%, var(--blue-dark));
    }

    .mh-models-scope .cta-whatsapp {
      background: linear-gradient(135deg, #1fcf72, #0d9a52 58%, #087243);
    }

    .mh-models-scope .cta-main {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 13px;
    }

    .mh-models-scope .cta-icon {
      flex: 0 0 48px;
      width: 48px;
      height: 48px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 15px;
      background: rgba(255, 255, 255, 0.16);
    }

    .mh-models-scope .cta svg {
      width: 22px;
      height: 22px;
      fill: currentColor;
    }

    .mh-models-scope .cta-title {
      font-size: clamp(14px, 1vw, 16px);
      font-weight: 950;
      white-space: nowrap;
    }

    .mh-models-scope .cta-arrow {
      flex: 0 0 auto;
      width: 31px;
      height: 31px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.16);
      font-weight: 900;
    }

    @media (max-width: 980px) {
      .mh-models-scope .details-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
          "info"
          "visual"
          "actions";
        width: min(720px, 100%);
        margin-inline: auto;
      }

      .mh-models-scope .main-preview {
        height: min(62vh, 630px);
      }

      .mh-models-scope .gallery-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }
    }

    @media (max-width: 760px) {
      .mh-models-scope {
        --card-w: clamp(96px, 30vw, 146px);
      }

      .mh-models-scope .hero-header {
        top: 12px;
        gap: 7px;
      }

      .mh-models-scope .hero-title {
        padding: 9px 17px;
        font-size: 15px;
      }

      .mh-models-scope .branch-tabs {
        justify-content: flex-start;
        padding: 5px;
      }

      .mh-models-scope .branch-tab {
        min-height: 31px;
        padding: 6px 11px;
        font-size: 10px;
      }

      .mh-models-scope .slide {
        top: 51.5%;
      }

      .mh-models-scope .branch-summary {
        bottom: 53px;
        font-size: 10px;
      }

      .mh-models-scope .swipe-hint {
        bottom: 12px;
        min-height: 31px;
        padding: 6px 12px;
        font-size: 10px;
      }

      .mh-models-scope .details-page {
        padding: 10px;
      }

      .mh-models-scope .details-topbar {
        top: 7px;
        margin-bottom: 14px;
        padding: 7px;
        border-radius: 17px;
      }

      .mh-models-scope .back-btn,
      .mh-models-scope .topbar-branch {
        min-height: 39px;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 12px;
      }

      .mh-models-scope .details-grid {
        gap: 14px;
      }

      .mh-models-scope .details-title-card {
        gap: 11px;
        padding: 16px;
        border-radius: 21px;
      }

      .mh-models-scope .details-title {
        font-size: clamp(26px, 8vw, 36px);
      }

      .mh-models-scope .details-desc {
        font-size: 13px;
        line-height: 1.85;
      }

      .mh-models-scope .details-image-card {
        padding: 8px;
        border-radius: 21px;
      }

      .mh-models-scope .main-preview {
        height: auto;
        max-height: 52vh;
        aspect-ratio: var(--main-ratio, var(--poster-ratio));
        border-radius: 18px;
      }

      .mh-models-scope .main-preview::before {
        opacity: 0.48;
        filter: blur(24px) saturate(1.08) brightness(0.72);
      }

      .mh-models-scope .main-image-label {
        right: 9px;
        bottom: 9px;
        left: 9px;
        min-height: 32px;
        padding: 7px 10px;
        font-size: 11px;
      }

      .mh-models-scope .gallery-shell {
        padding: 11px;
        border-radius: 20px;
      }

      .mh-models-scope .gallery-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
      }

      .mh-models-scope .gallery-row {
        grid-template-columns: repeat(5, minmax(70px, 1fr));
        gap: 7px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
      }

      .mh-models-scope .thumb {
        border-radius: 13px;
      }

      .mh-models-scope .details-actions {
        grid-template-columns: 1fr;
        padding: 11px;
        gap: 9px;
        border-radius: 20px;
      }

      .mh-models-scope .cta {
        min-height: 62px;
        padding: 10px 12px;
        border-radius: 17px;
      }

      .mh-models-scope .cta-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 13px;
      }
    }

    @media (max-width: 430px) {
      .mh-models-scope .hero-line {
        display: none;
      }

      .mh-models-scope .hero-title-row {
        justify-content: center;
      }

      .mh-models-scope .branch-tabs-shell {
        justify-content: stretch;
      }

      .mh-models-scope .branch-tabs {
        width: 100%;
      }

      .mh-models-scope .branch-summary {
        width: calc(100vw - 20px);
      }

      .mh-models-scope .unit-meta {
        grid-template-columns: 1fr;
      }

      .mh-models-scope .topbar-branch {
        max-width: 52vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .mh-models-scope, .mh-models-scope *,
      .mh-models-scope *::before,
      .mh-models-scope *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
  
    /* =====================================================
       Responsive refinement - mobile overlays and all pages
       ===================================================== */
    .mh-models-scope,
    .mh-models-scope {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow-x: clip;
    }

    .mh-models-scope,
    .mh-models-scope .app-shell,
    .mh-models-scope .app-view,
    .mh-models-scope .apartment-models-section,
    .mh-models-scope .details-page,
    .mh-models-scope .details-container,
    .mh-models-scope .details-grid,
    .mh-models-scope .details-visual,
    .mh-models-scope .details-info,
    .mh-models-scope .details-panel {
      min-width: 0;
      max-width: 100%;
    }

    .mh-models-scope img,
    .mh-models-scope svg {
      max-width: 100%;
    }

    .mh-models-scope .apartment-models-section,
    .mh-models-scope .carousel-stage,
    .mh-models-scope .carousel {
      min-height: 100vh;
      min-height: 100svh;
    }

    .mh-models-scope .details-page {
      width: 100%;
      overflow-x: clip;
    }

    .mh-models-scope .details-topbar,
    .mh-models-scope .details-grid,
    .mh-models-scope .details-title-card,
    .mh-models-scope .details-actions,
    .mh-models-scope .gallery-shell,
    .mh-models-scope .unit-meta {
      width: 100%;
    }

    .mh-models-scope .details-title,
    .mh-models-scope .details-desc,
    .mh-models-scope .meta-value,
    .mh-models-scope .gallery-title,
    .mh-models-scope .gallery-hint,
    .mh-models-scope .cta-title {
      overflow-wrap: anywhere;
    }

    @media (max-width: 760px) {
      /* النصوص فوق صور النماذج أصغر وأنظف في الجوال */
      .mh-models-scope .branch-badge {
        top: 5px;
        right: 5px;
        min-height: 19px;
        gap: 3px;
        padding: 3px 6px;
        border-radius: 999px;
        font-size: 7px;
        line-height: 1;
      }

      .mh-models-scope .branch-badge::before {
        width: 4px;
        height: 4px;
      }

      .mh-models-scope .slide-content {
        right: 5px;
        bottom: 5px;
        left: 5px;
        gap: 4px;
      }

      .mh-models-scope .apartment-name {
        min-height: 24px;
        padding: 4px 5px;
        border-radius: 8px;
        font-size: 8.5px;
        line-height: 1.15;
      }

      .mh-models-scope .more-btn {
        min-height: 25px;
        padding-inline: 5px;
        font-size: 8px;
        line-height: 1;
      }

      .mh-models-scope .hero-header {
        width: calc(100% - 16px);
      }

      .mh-models-scope .hero-title {
        max-width: calc(100vw - 28px);
        padding: 8px 14px;
        overflow: hidden;
        font-size: 13px;
        text-overflow: ellipsis;
      }

      .mh-models-scope .branch-tabs-shell,
      .mh-models-scope .branch-tabs {
        width: 100%;
        max-width: 100%;
      }

      .mh-models-scope .branch-tabs {
        justify-content: flex-start;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
      }

      .mh-models-scope .branch-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
      }

      .mh-models-scope .details-page {
        padding: 8px;
      }

      .mh-models-scope .details-topbar {
        top: 6px;
        gap: 7px;
      }

      .mh-models-scope .back-btn,
      .mh-models-scope .topbar-branch {
        min-width: 0;
        max-width: calc(50% - 4px);
        padding: 8px 10px;
        font-size: 11px;
      }

      .mh-models-scope .back-btn {
        flex: 0 1 auto;
      }

      .mh-models-scope .topbar-branch {
        flex: 0 1 auto;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      .mh-models-scope .details-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
      }

      .mh-models-scope .details-title-card {
        padding: 14px;
      }

      .mh-models-scope .details-branch-line {
        gap: 8px;
        font-size: 11px;
      }

      .mh-models-scope .details-title {
        font-size: clamp(23px, 7vw, 32px);
        line-height: 1.18;
      }

      .mh-models-scope .details-desc {
        font-size: 12px;
        line-height: 1.75;
      }

      .mh-models-scope .unit-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
      }

      .mh-models-scope .meta-item {
        min-height: 52px;
        padding: 10px;
        border-radius: 14px;
      }

      .mh-models-scope .meta-label {
        font-size: 9px;
      }

      .mh-models-scope .meta-value {
        font-size: 11px;
        line-height: 1.35;
      }

      .mh-models-scope .main-preview {
        width: 100%;
        max-width: 100%;
        max-height: min(54svh, 560px);
      }

      .mh-models-scope .main-image-label {
        right: 7px;
        bottom: 7px;
        left: 7px;
        min-height: 27px;
        padding: 5px 8px;
        font-size: 9px;
      }

      .mh-models-scope .gallery-title {
        font-size: 13px;
      }

      .mh-models-scope .gallery-hint {
        font-size: 10px;
      }

      .mh-models-scope .gallery-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        overflow: visible;
        padding-bottom: 0;
      }

      .mh-models-scope .thumb {
        min-width: 0;
      }

      .mh-models-scope .thumb-label {
        right: 4px;
        bottom: 4px;
        left: 4px;
        min-height: 19px;
        padding: 3px 4px;
        border-radius: 7px;
        font-size: 7px;
      }

      .mh-models-scope .details-actions {
        width: 100%;
      }

      .mh-models-scope .cta {
        width: 100%;
        min-width: 0;
      }

      .mh-models-scope .cta-main {
        min-width: 0;
      }

      .mh-models-scope .cta-title {
        font-size: 13px;
      }
    }

    @media (max-width: 430px) {
      .mh-models-scope {
        --card-w: clamp(92px, 29vw, 122px);
      }

      .mh-models-scope .hero-header {
        top: 9px;
        gap: 5px;
      }

      .mh-models-scope .hero-title {
        padding: 7px 12px;
        border-radius: 13px;
        font-size: 12px;
      }

      .mh-models-scope .branch-tabs {
        gap: 4px;
        padding: 4px;
      }

      .mh-models-scope .branch-tab {
        min-height: 28px;
        gap: 4px;
        padding: 5px 9px;
        font-size: 9px;
      }

      .mh-models-scope .branch-count {
        min-width: 17px;
        height: 17px;
        padding-inline: 4px;
        font-size: 8px;
      }

      .mh-models-scope .branch-badge {
        max-width: calc(100% - 10px);
        min-height: 17px;
        padding: 3px 5px;
        font-size: 6.5px;
      }

      .mh-models-scope .slide-content {
        gap: 3px;
      }

      .mh-models-scope .apartment-name {
        min-height: 22px;
        padding: 3px 4px;
        font-size: 7.5px;
      }

      .mh-models-scope .more-btn {
        min-height: 23px;
        font-size: 7px;
      }

      .mh-models-scope .branch-summary {
        bottom: 49px;
        padding-inline: 6px;
        font-size: 9px;
        line-height: 1.35;
      }

      .mh-models-scope .swipe-hint {
        min-height: 28px;
        padding: 5px 9px;
        font-size: 9px;
      }

      .mh-models-scope .details-page {
        padding: 6px;
      }

      .mh-models-scope .details-topbar {
        padding: 6px;
        border-radius: 14px;
      }

      .mh-models-scope .back-btn,
      .mh-models-scope .topbar-branch {
        min-height: 36px;
        max-width: calc(50% - 3px);
        padding: 7px 8px;
        border-radius: 10px;
        font-size: 10px;
      }

      .mh-models-scope .back-icon {
        font-size: 15px;
      }

      .mh-models-scope .details-title-card,
      .mh-models-scope .details-image-card,
      .mh-models-scope .gallery-shell,
      .mh-models-scope .details-actions {
        border-radius: 17px;
      }

      .mh-models-scope .details-title-card {
        padding: 12px;
      }

      .mh-models-scope .details-title {
        font-size: clamp(21px, 7.5vw, 29px);
      }

      .mh-models-scope .unit-meta {
        grid-template-columns: 1fr;
      }

      .mh-models-scope .meta-item {
        min-height: 48px;
      }

      .mh-models-scope .main-preview {
        max-height: min(50svh, 470px);
        border-radius: 15px;
      }

      .mh-models-scope .gallery-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
      }

      .mh-models-scope .cta {
        min-height: 57px;
        padding: 9px 10px;
        border-radius: 15px;
      }

      .mh-models-scope .cta-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 11px;
      }

      .mh-models-scope .cta svg {
        width: 19px;
        height: 19px;
      }

      .mh-models-scope .cta-title {
        font-size: 12px;
      }

      .mh-models-scope .cta-arrow {
        width: 27px;
        height: 27px;
        font-size: 13px;
      }
    }

    @media (max-width: 340px) {
      .mh-models-scope {
        --card-w: clamp(86px, 28vw, 102px);
      }

      .mh-models-scope .hero-title {
        font-size: 11px;
      }

      .mh-models-scope .branch-tab {
        padding-inline: 7px;
        font-size: 8.5px;
      }

      .mh-models-scope .apartment-name {
        font-size: 7px;
      }

      .mh-models-scope .more-btn {
        font-size: 6.5px;
      }

      .mh-models-scope .back-btn,
      .mh-models-scope .topbar-branch {
        font-size: 9px;
      }
    }

    @media (max-height: 600px) and (orientation: landscape) {
      .mh-models-scope .hero-header {
        top: 7px;
        gap: 4px;
      }

      .mh-models-scope .hero-title {
        padding-block: 6px;
        font-size: 12px;
      }

      .mh-models-scope .branch-tab {
        min-height: 27px;
        padding-block: 4px;
      }

      .mh-models-scope .slide {
        top: 55%;
      }

      .mh-models-scope .branch-summary {
        bottom: 42px;
      }

      .mh-models-scope .swipe-hint {
        bottom: 7px;
      }

      .mh-models-scope .main-preview {
        max-height: 72svh;
      }
    }

  
    /* =========================
       ألوان أزرار هوية مال هوم
       مستخرجة من درجات الشعار: كحلي + أزرق ملكي
       ========================= */
    .mh-models-scope {
      --brand-navy: #022055;
      --brand-navy-deep: #01183f;
      --brand-blue: #0c6fbe;
      --brand-blue-2: #176fba;
      --brand-blue-soft: #2b87cc;
    }

    .mh-models-scope .branch-tab {
      border-color: rgba(43, 135, 204, 0.08);
    }

    .mh-models-scope .branch-tab:hover {
      color: var(--white);
      border-color: rgba(43, 135, 204, 0.34);
      background: rgba(12, 111, 190, 0.14);
    }

    .mh-models-scope .branch-tab.is-active {
      color: var(--white);
      border-color: rgba(80, 157, 216, 0.64);
      background: linear-gradient(135deg, var(--brand-blue) 0%, #07528f 52%, var(--brand-navy) 100%);
      box-shadow: 0 9px 20px rgba(1, 24, 63, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    .mh-models-scope .branch-tab.is-active .branch-count {
      color: var(--white);
      background: rgba(255, 255, 255, 0.17);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    .mh-models-scope .more-btn {
      color: var(--white);
      border: 1px solid rgba(80, 157, 216, 0.52);
      background: linear-gradient(135deg, var(--brand-blue-2) 0%, #075a9d 52%, var(--brand-navy) 100%);
      box-shadow: 0 10px 20px rgba(1, 24, 63, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    .mh-models-scope .more-btn:hover {
      filter: none;
      background: linear-gradient(135deg, #2184cf 0%, var(--brand-blue) 54%, #032d68 100%);
      box-shadow: 0 14px 24px rgba(1, 24, 63, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }

    .mh-models-scope .back-btn {
      border-color: rgba(43, 135, 204, 0.38);
      background: linear-gradient(135deg, rgba(12, 111, 190, 0.28), rgba(2, 32, 85, 0.82));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .mh-models-scope .back-btn:hover {
      background: linear-gradient(135deg, rgba(23, 111, 186, 0.46), rgba(2, 32, 85, 0.96));
    }

    .mh-models-scope .topbar-branch {
      border: 1px solid rgba(43, 135, 204, 0.3);
      background: linear-gradient(135deg, rgba(12, 111, 190, 0.32), rgba(2, 32, 85, 0.72));
    }

    .mh-models-scope .topbar-branch::before,
    .mh-models-scope .branch-badge::before {
      background: var(--brand-blue-soft);
      box-shadow: 0 0 10px rgba(43, 135, 204, 0.65);
    }

    .mh-models-scope .swipe-hint-icon {
      color: var(--white);
      background: linear-gradient(135deg, var(--brand-blue-2), var(--brand-navy));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }

    .mh-models-scope .cta-primary {
      background: linear-gradient(135deg, var(--brand-blue-2) 0%, #075b9f 52%, var(--brand-navy) 100%);
      border-color: rgba(80, 157, 216, 0.46);
    }

    .mh-models-scope .cta-whatsapp {
      background: linear-gradient(135deg, #0a5f9f 0%, #06477e 52%, var(--brand-navy) 100%);
      border-color: rgba(80, 157, 216, 0.4);
    }

    .mh-models-scope .cta-whatsapp .cta-icon {
      background: rgba(16, 160, 86, 0.92);
      border-color: rgba(107, 225, 165, 0.42);
      box-shadow: 0 8px 18px rgba(7, 87, 47, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .mh-models-scope .cta:hover {
      box-shadow: 0 22px 38px rgba(1, 24, 63, 0.42);
    }

  

    /* إصلاح المسافة بين تفاصيل الوحدة وأزرار التواصل في الشاشات الكبيرة */
    @media (min-width: 981px) {
      .mh-models-scope .details-grid {
        grid-template-areas: "visual info";
        row-gap: 0;
      }

      .mh-models-scope .details-info {
        grid-area: info;
        display: grid;
        align-content: start;
        gap: 10px;
      }

      .mh-models-scope .details-actions {
        grid-area: auto;
        margin-top: 0;
      }
    }

    @media (max-width: 980px) {
      .mh-models-scope .details-info {
        display: contents;
      }

      .mh-models-scope .details-title-card {
        grid-area: info;
      }

      .mh-models-scope .details-actions {
        grid-area: actions;
      }
    }

/* إضافات النسخة المرتبطة بقاعدة البيانات */
.mh-models-scope .details-features{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}.mh-models-scope .feature-chip{padding:11px 13px;border:1px solid rgba(126,227,255,.16);border-radius:13px;background:rgba(126,227,255,.055);color:rgba(238,248,255,.88);font-size:13px;font-weight:800}.mh-models-scope .details-actions .cta{text-decoration:none}.mh-models-scope .admin-floating-link{position:fixed;left:14px;bottom:14px;z-index:1000;padding:8px 11px;border:1px solid rgba(126,227,255,.18);border-radius:10px;background:rgba(1,15,43,.72);color:rgba(238,248,255,.55);text-decoration:none;font-size:11px;backdrop-filter:blur(10px)}
@media(max-width:640px){.mh-models-scope .details-features{grid-template-columns:1fr}.mh-models-scope .admin-floating-link{display:none}}

.mh-models-scope .back-btn{text-decoration:none}


/* ==================================================
   Mal Home custom update - apartment models spacing
   ================================================== */
.mh-models-scope {
  min-height: auto !important;
}
.mh-models-scope .apartment-models-section {
  min-height: clamp(600px, 76svh, 820px) !important;
  min-height: clamp(600px, 76vh, 820px) !important;
}
.mh-models-scope .carousel-stage,
.mh-models-scope .carousel {
  min-height: clamp(600px, 76svh, 820px) !important;
  min-height: clamp(600px, 76vh, 820px) !important;
}
.mh-models-scope .hero-header {
  top: clamp(12px, 2.2vh, 22px);
}
.mh-models-scope .slide {
  top: 50.5%;
}
.mh-models-scope .branch-summary {
  bottom: clamp(40px, 5.3vh, 58px);
}
.mh-models-scope .swipe-hint {
  bottom: clamp(8px, 1.5vh, 16px);
}

@media (max-width: 991.98px) {
  .mh-models-scope .apartment-models-section,
  .mh-models-scope .carousel-stage,
  .mh-models-scope .carousel {
    min-height: 620px !important;
  }
  .mh-models-scope .branch-summary {
    bottom: 34px;
  }
}

@media (max-width: 767.98px) {
  .mh-models-scope .apartment-models-section,
  .mh-models-scope .carousel-stage,
  .mh-models-scope .carousel {
    min-height: 560px !important;
  }
  .mh-models-scope .hero-header {
    top: 10px;
  }
  .mh-models-scope .slide {
    top: 49.5%;
  }
  .mh-models-scope .branch-summary {
    bottom: 28px;
    width: min(520px, calc(100vw - 26px));
  }
  .mh-models-scope .swipe-hint {
    bottom: 8px;
  }
}

@media (max-width: 575.98px) {
  .mh-models-scope .apartment-models-section,
  .mh-models-scope .carousel-stage,
  .mh-models-scope .carousel {
    min-height: 520px !important;
  }
  .mh-models-scope .hero-header {
    width: min(100%, calc(100vw - 18px));
  }
  .mh-models-scope .hero-title {
    padding: 8px 18px;
  }
  .mh-models-scope .slide {
    top: 48.5%;
  }
  .mh-models-scope .branch-summary {
    bottom: 22px;
    font-size: 11px;
  }
  .mh-models-scope .swipe-hint {
    bottom: 6px;
    padding: 7px 12px;
  }
}


/* ===== 2026-07-18: apartment filters order and summary cleanup ===== */
.mh-models-scope .branch-tabs {
  direction: rtl !important;
}
.mh-models-scope .branch-tab {
  direction: rtl !important;
  flex-direction: row !important;
}
.mh-models-scope .branch-summary {
  display: none !important;
}
