/* ===== CONSOLIDATED SOURCE V38 ===== */
/* ==========================================================================
   REAL PROPERTY GURU — AGENCY STOREFRONT RESPONSIVE V38
   Target: the approved/generated mobile + tablet UI.
   Desktop >= 1025px: intentionally untouched.
   This stylesheet is intentionally loaded AFTER legacy V23 mobile rules.
   ========================================================================== */

@media (max-width: 1024px) {

  body#page-agency-profile {
    --rpg38-green:#087746;
    --rpg38-green-2:#11ad62;
    --rpg38-dark:#073f31;
    --rpg38-soft:#f4f8f6;
    --rpg38-line:#dfe9e3;
    --rpg38-text:#17251f;
    --rpg38-muted:#6d7a73;
    --rpg38-card:#fff;
    --rpg38-shadow:0 8px 24px rgba(2,67,47,.065);
    --rpg38-sticky-top:0px;
    overflow-x:hidden!important;
    background:#f5f8f6!important;
  }

  body#page-agency-profile .rpg-storefront,
  body#page-agency-profile .rpg-storefront * {
    box-sizing:border-box!important;
  }

  body#page-agency-profile .rpg-storefront {
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }

  body#page-agency-profile .rpg-storefront > .container,
  body#page-agency-profile .rpg-storefront .container {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* ============================================================
     HERO — preserve current desktop design, responsive reflow only
     ============================================================ */
  body#page-agency-profile .rpg-storefront__hero {
    width:100%!important;
    padding:10px 0 0!important;
    background:transparent!important;
  }

  body#page-agency-profile .rpg-storefront__hero > .container {
    padding-inline:12px!important;
  }

  body#page-agency-profile .rpg-storefront__breadcrumbs {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__hero-shell {
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    overflow:visible!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    background:transparent!important;
  }

  body#page-agency-profile .rpg-storefront__cover {
    position:relative!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    height:235px!important;
    min-height:235px!important;
    max-height:235px!important;
    margin:0!important;
    overflow:hidden!important;
    border-radius:18px!important;
    background-image:
      linear-gradient(180deg,rgba(0,53,37,.02),rgba(0,53,37,.16)),
      var(--rpg-storefront-cover)!important;
    background-size:cover!important;
    background-position:center!important;
    box-shadow:0 9px 26px rgba(2,67,47,.08)!important;
  }

  body#page-agency-profile .rpg-storefront__cover-gallery {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__identity {
    position:relative!important;
    z-index:4!important;
    display:block!important;
    width:calc(100% - 34px)!important;
    max-width:none!important;
    min-width:0!important;
    margin:-46px auto 0!important;
    padding:17px!important;
    border:1px solid rgba(7,119,70,.10)!important;
    border-radius:17px!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 16px 38px rgba(2,65,45,.115),0 4px 12px rgba(2,65,45,.045)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
  }

  body#page-agency-profile .rpg-storefront__identity-top {
    display:flex!important;
    align-items:flex-start!important;
    gap:13px!important;
    width:100%!important;
    min-width:0!important;
  }

  body#page-agency-profile .rpg-storefront__logo {
    width:76px!important;
    height:76px!important;
    min-width:76px!important;
    min-height:76px!important;
    max-width:76px!important;
    max-height:76px!important;
    flex:0 0 76px!important;
    margin:0!important;
    overflow:hidden!important;
    border:4px solid #fff!important;
    border-radius:17px!important;
    background:#fff!important;
    box-shadow:0 7px 18px rgba(2,67,47,.10)!important;
  }

  body#page-agency-profile .rpg-storefront__logo img {
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    object-fit:contain!important;
  }

  body#page-agency-profile .rpg-storefront__title {
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:100%!important;
  }

  body#page-agency-profile .rpg-storefront__badges,
  body#page-agency-profile .rpg-storefront__specialties {
    display:flex!important;
    flex-wrap:wrap!important;
    gap:5px!important;
    width:100%!important;
  }

  body#page-agency-profile .rpg-storefront__badges span,
  body#page-agency-profile .rpg-storefront__specialties span {
    width:auto!important;
    min-width:0!important;
    min-height:23px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0 8px!important;
    border-radius:999px!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  body#page-agency-profile .rpg-storefront__title h1 {
    margin:6px 0 5px!important;
    padding:0!important;
    color:var(--rpg38-text)!important;
    font-size:23px!important;
    line-height:1.12!important;
    font-weight:800!important;
    letter-spacing:-.02em!important;
    overflow-wrap:anywhere!important;
  }

  body#page-agency-profile .rpg-storefront__signature {
    display:flex!important;
    flex-wrap:wrap!important;
    gap:5px 10px!important;
    margin-top:7px!important;
    color:var(--rpg38-muted)!important;
    font-size:11.5px!important;
    line-height:1.25!important;
  }

  body#page-agency-profile .rpg-storefront__signature i {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__signature span {
    display:inline-flex!important;
    align-items:center!important;
    gap:4px!important;
  }

  body#page-agency-profile .rpg-storefront__signature svg {
    width:14px!important;
    height:14px!important;
    min-width:14px!important;
  }

  body#page-agency-profile .rpg-storefront__stats,
  body#page-agency-profile .rpg-storefront__insights {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    margin-top:12px!important;
  }

  body#page-agency-profile .rpg-storefront__stats > div,
  body#page-agency-profile .rpg-storefront__insights > div {
    width:100%!important;
    min-width:0!important;
    min-height:58px!important;
    margin:0!important;
    padding:9px!important;
    border:1px solid #e3ece6!important;
    border-radius:10px!important;
    background:#f8fbf9!important;
  }

  body#page-agency-profile .rpg-storefront__stats strong,
  body#page-agency-profile .rpg-storefront__insights strong {
    display:block!important;
    color:var(--rpg38-green)!important;
    font-size:16px!important;
    line-height:1!important;
    font-weight:850!important;
  }

  body#page-agency-profile .rpg-storefront__stats span,
  body#page-agency-profile .rpg-storefront__insights span {
    display:block!important;
    margin-top:4px!important;
    color:var(--rpg38-muted)!important;
    font-size:11px!important;
    line-height:1.22!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions {
    display:grid!important;
    grid-template-columns:minmax(0,2fr) minmax(120px,1fr)!important;
    align-items:stretch!important;
    gap:7px!important;
    width:100%!important;
    margin-top:11px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-actions {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary {
    width:100%!important;
    min-width:0!important;
    min-height:40px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    margin:0!important;
    padding:0 9px!important;
    overflow:hidden!important;
    border-radius:9px!important;
    font-size:11.5px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions svg {
    width:15px!important;
    height:15px!important;
    min-width:15px!important;
  }

  /* ============================================================
     PROFILE NAV
     ============================================================ */
  body#page-agency-profile .rpg-storefront__nav {
    position:sticky!important;
    top:var(--rpg38-sticky-top,0px)!important;
    z-index:1010!important;
    width:100%!important;
    margin:10px 0 0!important;
    border-top:1px solid #e3ebe6!important;
    border-bottom:1px solid #e3ebe6!important;
    background:rgba(255,255,255,.975)!important;
    box-shadow:0 5px 14px rgba(2,67,47,.045)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
  }

  body#page-agency-profile .rpg-storefront__nav .container {
    display:flex!important;
    align-items:center!important;
    gap:3px!important;
    overflow-x:auto!important;
    width:100%!important;
    max-width:none!important;
    padding:6px 12px!important;
    scrollbar-width:none!important;
    scroll-snap-type:x proximity!important;
  }

  body#page-agency-profile .rpg-storefront__nav .container::-webkit-scrollbar {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__nav a {
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    min-height:34px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    margin:0!important;
    padding:0 11px!important;
    border:0!important;
    border-radius:8px!important;
    color:#4e5d55!important;
    background:transparent!important;
    font-size:11.5px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
    scroll-snap-align:start!important;
  }

  body#page-agency-profile .rpg-storefront__nav a.is-active {
    color:var(--rpg38-green)!important;
    background:#eaf6ef!important;
  }

  /* ============================================================
     MAIN PAGE CARDS
     ============================================================ */
  body#page-agency-profile .rpg-storefront__layout {
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:12px!important;
  }

  body#page-agency-profile .rpg-storefront__main {
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
  }

  /* Redundant desktop sidebar is intentionally hidden at mobile/tablet.
     The approved responsive UI uses the hero contact controls. */
  body#page-agency-profile .rpg-storefront__sidebar {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 0 11px!important;
    padding:15px!important;
    overflow:hidden!important;
    border:1px solid #e1eae4!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:var(--rpg38-shadow)!important;
  }

  body#page-agency-profile .rpg-storefront__section-head,
  body#page-agency-profile .rpg-storefront__section-head--row {
    display:flex!important;
    align-items:flex-end!important;
    justify-content:space-between!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    margin:0 0 10px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > div {
    min-width:0!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > span,
  body#page-agency-profile .rpg-storefront__section-head > div > span {
    display:block!important;
    margin-bottom:3px!important;
    color:var(--rpg38-green)!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:900!important;
    letter-spacing:.055em!important;
    text-transform:uppercase!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2 {
    margin:0!important;
    padding:0!important;
    color:var(--rpg38-text)!important;
    font-size:19px!important;
    line-height:1.15!important;
    font-weight:800!important;
  }

  body#page-agency-profile .rpg-storefront__section-head p,
  body#page-agency-profile .rpg-storefront__richtext,
  body#page-agency-profile .rpg-storefront__richtext p {
    margin:0!important;
    color:var(--rpg38-muted)!important;
    font-size:12.5px!important;
    line-height:1.45!important;
  }

  body#page-agency-profile .rpg-storefront__reset-link {
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:5px 8px!important;
    border-radius:8px!important;
    background:#edf8f2!important;
    color:var(--rpg38-green)!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
  }

  /* ============================================================
     CATEGORIES
     ============================================================ */
  body#page-agency-profile .rpg-storefront__categories {
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__categories > a {
    width:100%!important;
    min-width:0!important;
    min-height:66px!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    margin:0!important;
    padding:9px!important;
    overflow:hidden!important;
    border:1px solid #e3ece6!important;
    border-radius:10px!important;
    background:#fbfdfc!important;
    box-shadow:0 4px 12px rgba(2,67,47,.03)!important;
  }

  body#page-agency-profile .rpg-storefront__category-icon {
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    display:grid!important;
    place-items:center!important;
    margin:0!important;
    border-radius:8px!important;
    background:#eaf7ef!important;
    color:var(--rpg38-green)!important;
  }

  body#page-agency-profile .rpg-storefront__category-icon svg {
    width:16px!important;
    height:16px!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong,
  body#page-agency-profile .rpg-storefront__categories small {
    display:block!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong {
    color:var(--rpg38-text)!important;
    font-size:11.5px!important;
    line-height:1.1!important;
  }

  body#page-agency-profile .rpg-storefront__categories small {
    margin-top:3px!important;
    color:var(--rpg38-muted)!important;
    font-size:10.5px!important;
    line-height:1!important;
  }

  body#page-agency-profile .rpg-storefront__categories > a > svg:last-child {
    display:none!important;
  }

  /* ============================================================
     PROPERTY GRIDS
     ============================================================ */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    align-items:stretch!important;
  }

  body#page-agency-profile .rpg-storefront__featured-grid > .property-item,
  body#page-agency-profile .rpg-storefront__property-grid > .property-item {
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #e0e9e3!important;
    border-radius:11px!important;
    background:#fff!important;
    box-shadow:0 5px 15px rgba(2,67,47,.045)!important;
  }

  body#page-agency-profile .rpg-storefront .property-item > .archive-top {
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    height:142px!important;
    min-height:142px!important;
    max-height:142px!important;
    aspect-ratio:auto!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-style img,
  body#page-agency-profile .rpg-storefront .property-item .images-style .card-image-slider,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"] img {
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-height:100%!important;
    max-height:none!important;
    object-fit:cover!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content {
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:9px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"] {
    min-height:0!important;
    max-height:none!important;
    display:-webkit-box!important;
    overflow:hidden!important;
    margin:0!important;
    color:var(--rpg38-text)!important;
    font-size:12.5px!important;
    line-height:1.28!important;
    font-weight:800!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"] {
    min-height:0!important;
    max-height:none!important;
    display:-webkit-box!important;
    overflow:hidden!important;
    margin-top:5px!important;
    color:var(--rpg38-muted)!important;
    font-size:11px!important;
    line-height:1.28!important;
    -webkit-line-clamp:1!important;
    -webkit-box-orient:vertical!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"] {
    min-height:0!important;
    max-height:none!important;
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:4px 7px!important;
    margin-top:6px!important;
    color:#65736b!important;
    font-size:10.8px!important;
    line-height:1.2!important;
  }

  body#page-agency-profile .rpg-storefront .property-item > .archive-bottom {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:7px 9px!important;
    border-top:1px solid #edf1ef!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-agent {
    min-width:0!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"] {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    margin:0!important;
    color:var(--rpg38-green)!important;
    font-size:13px!important;
    line-height:1.2!important;
    font-weight:900!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7 {
    color:var(--rpg38-green)!important;
    font-size:13px!important;
    line-height:1.2!important;
    font-weight:900!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-actions,
  body#page-agency-profile .rpg-storefront .property-contact-actions--card,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0 9px 9px!important;
    border-top:0!important;
    background:#fff!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button {
    width:100%!important;
    min-width:0!important;
    min-height:33px!important;
    max-height:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    margin:0!important;
    padding:0 5px!important;
    overflow:hidden!important;
    border-radius:7px!important;
    font-size:10.8px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action svg {
    width:13px!important;
    height:13px!important;
    min-width:13px!important;
  }

  /* ============================================================
     FILTER TOOLBAR
     ============================================================ */
  body#page-agency-profile .rpg-storefront__filters {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:9px!important;
    overflow:hidden!important;
    border:1px solid #e0e9e3!important;
    border-radius:11px!important;
    background:#f9fcfa!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search {
    position:relative!important;
    grid-column:1!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input {
    width:100%!important;
    min-width:0!important;
    height:39px!important;
    min-height:39px!important;
    margin:0!important;
    padding:0 10px 0 34px!important;
    border:1px solid #dfe8e2!important;
    border-radius:8px!important;
    background:#fff!important;
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search svg {
    position:absolute!important;
    left:10px!important;
    top:50%!important;
    width:15px!important;
    height:15px!important;
    transform:translateY(-50%)!important;
    color:#708078!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle {
    grid-column:2!important;
    min-width:88px!important;
    min-height:39px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    margin:0!important;
    padding:0 10px!important;
    border:1px solid #cfe2d7!important;
    border-radius:8px!important;
    background:#fff!important;
    color:var(--rpg38-green)!important;
    font-size:11.5px!important;
    line-height:1!important;
    font-weight:850!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle svg {
    width:15px!important;
    height:15px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs {
    grid-column:1/-1!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    width:100%!important;
    overflow-x:auto!important;
    margin:0!important;
    padding:0!important;
    scrollbar-width:none!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs::-webkit-scrollbar {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a,
  body#page-agency-profile .rpg-storefront__transaction-tabs button {
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    min-height:32px!important;
    margin:0!important;
    padding:0 10px!important;
    border-radius:7px!important;
    font-size:10.8px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid,
  body#page-agency-profile .rpg-storefront__filter-actions {
    grid-column:1/-1!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid {
    display:none!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    padding-top:2px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-actions {
    display:none!important;
    width:100%!important;
  }

  body#page-agency-profile .rpg-storefront__filters.is-v38-open .rpg-storefront__filter-grid {
    display:grid!important;
  }

  body#page-agency-profile .rpg-storefront__filters.is-v38-open .rpg-storefront__filter-actions {
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid label {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid label > span {
    display:block!important;
    margin:0 0 4px!important;
    color:#637269!important;
    font-size:10.5px!important;
    line-height:1.1!important;
    font-weight:750!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid input,
  body#page-agency-profile .rpg-storefront__filter-grid select {
    width:100%!important;
    min-width:0!important;
    height:37px!important;
    min-height:37px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:7px!important;
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__check {
    min-width:0!important;
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__apply {
    min-height:37px!important;
    padding:0 10px!important;
    border-radius:7px!important;
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__results-bar {
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    margin:9px 0!important;
    font-size:11px!important;
  }

  /* ============================================================
     TEAM / LOCATIONS / TRUST / SIMILAR
     ============================================================ */
  body#page-agency-profile .rpg-storefront__empty-soft {
    width:100%!important;
    min-height:54px!important;
    margin:0!important;
    padding:11px!important;
    border-radius:9px!important;
    background:#f7faf8!important;
    color:var(--rpg38-muted)!important;
    font-size:11.5px!important;
    line-height:1.4!important;
  }

  body#page-agency-profile .rpg-storefront__locations {
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    width:100%!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a {
    width:auto!important;
    min-width:0!important;
    min-height:33px!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:4px!important;
    margin:0!important;
    padding:0 9px!important;
    border:1px solid #dce8e1!important;
    border-radius:999px!important;
    background:#f8fbf9!important;
    color:#526159!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  body#page-agency-profile .rpg-storefront__locations svg {
    width:13px!important;
    height:13px!important;
  }

  body#page-agency-profile .rpg-profile__trust {
    display:grid!important;
    grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)!important;
    gap:14px!important;
    border:0!important;
    background:linear-gradient(135deg,#075943,#07804d)!important;
    color:#fff!important;
    box-shadow:0 10px 28px rgba(1,69,49,.14)!important;
  }

  body#page-agency-profile .rpg-profile__trust * {
    color:#fff!important;
  }

  body#page-agency-profile .rpg-profile__trust h3 {
    margin:3px 0 5px!important;
    font-size:17px!important;
    line-height:1.15!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span {
    font-size:11.5px!important;
    line-height:1.4!important;
  }

  body#page-agency-profile .rpg-profile__trust-points {
    display:grid!important;
    gap:6px!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid > * {
    min-width:0!important;
    max-width:100%!important;
  }

  /* ============================================================
     TABLET FOOTER
     ============================================================ */
  body#page-agency-profile .rpg-market-footer {
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-market-footer > .container {
    width:100%!important;
    max-width:100%!important;
    padding-inline:18px!important;
  }

  body#page-agency-profile .rpg-market-footer__grid {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:18px!important;
    width:100%!important;
  }

  body#page-agency-profile .rpg-market-footer__brand {
    grid-column:1/3!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter {
    grid-column:3/5!important;
  }

  body#page-agency-profile .rpg-market-footer__col {
    min-width:0!important;
  }
}

/* ==========================================================================
   MOBILE — <= 576px
   ========================================================================== */
@media (max-width:576px) {

  body#page-agency-profile {
    padding-bottom:78px!important;
  }

  body#page-agency-profile .rpg-storefront__hero {
    padding-top:5px!important;
  }

  body#page-agency-profile .rpg-storefront__hero > .container {
    padding-inline:5px!important;
  }

  body#page-agency-profile .rpg-storefront__cover {
    height:154px!important;
    min-height:154px!important;
    max-height:154px!important;
    border-radius:12px!important;
  }

  body#page-agency-profile .rpg-storefront__identity {
    width:calc(100% - 10px)!important;
    margin-top:-24px!important;
    padding:11px!important;
    border-radius:13px!important;
  }

  body#page-agency-profile .rpg-storefront__identity-top {
    gap:8px!important;
  }

  body#page-agency-profile .rpg-storefront__logo {
    width:55px!important;
    height:55px!important;
    min-width:55px!important;
    min-height:55px!important;
    max-width:55px!important;
    max-height:55px!important;
    flex-basis:55px!important;
    border-width:3px!important;
    border-radius:12px!important;
  }

  body#page-agency-profile .rpg-storefront__badges span,
  body#page-agency-profile .rpg-storefront__specialties span {
    min-height:20px!important;
    padding:0 6px!important;
    font-size:10px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1 {
    margin:4px 0 3px!important;
    font-size:18px!important;
  }

  body#page-agency-profile .rpg-storefront__specialties {
    margin-top:3px!important;
  }

  body#page-agency-profile .rpg-storefront__signature {
    display:none!important;
  }

  /* Approved mobile reference keeps metrics in Overview;
     hide duplicated hero stats to keep hero compact. */
  body#page-agency-profile .rpg-storefront__stats {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)!important;
    gap:5px!important;
    margin-top:8px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-actions {
    display:contents!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary {
    min-height:36px!important;
    padding:0 5px!important;
    border-radius:8px!important;
    font-size:10.5px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions svg {
    width:13px!important;
    height:13px!important;
    min-width:13px!important;
  }

  body#page-agency-profile .rpg-storefront__nav {
    margin-top:7px!important;
  }

  body#page-agency-profile .rpg-storefront__nav .container {
    padding:5px!important;
  }

  body#page-agency-profile .rpg-storefront__nav a {
    min-height:32px!important;
    padding:0 9px!important;
    font-size:10.5px!important;
  }

  body#page-agency-profile .rpg-storefront__layout {
    padding:7px 5px 10px!important;
  }

  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust {
    margin-bottom:8px!important;
    padding:10px!important;
    border-radius:11px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head,
  body#page-agency-profile .rpg-storefront__section-head--row {
    margin-bottom:8px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2 {
    font-size:16.5px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head p,
  body#page-agency-profile .rpg-storefront__richtext,
  body#page-agency-profile .rpg-storefront__richtext p {
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__insights {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    margin-top:8px!important;
  }

  body#page-agency-profile .rpg-storefront__insights > div {
    min-height:54px!important;
    padding:8px!important;
    border-radius:8px!important;
  }

  body#page-agency-profile .rpg-storefront__insights strong {
    font-size:15px!important;
  }

  body#page-agency-profile .rpg-storefront__insights span {
    font-size:10.8px!important;
  }

  /* Category cards horizontally swipe like approved UI */
  body#page-agency-profile .rpg-storefront__categories {
    display:flex!important;
    grid-template-columns:none!important;
    gap:6px!important;
    overflow-x:auto!important;
    width:auto!important;
    max-width:none!important;
    margin:0 -10px!important;
    padding:1px 10px 6px!important;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:none!important;
  }

  body#page-agency-profile .rpg-storefront__categories::-webkit-scrollbar {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__categories > a {
    flex:0 0 116px!important;
    width:116px!important;
    min-height:59px!important;
    padding:7px!important;
    scroll-snap-align:start!important;
  }

  body#page-agency-profile .rpg-storefront__category-icon {
    width:27px!important;
    height:27px!important;
    min-width:27px!important;
    min-height:27px!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong {
    font-size:10.8px!important;
  }

  body#page-agency-profile .rpg-storefront__categories small {
    font-size:10px!important;
  }

  /* EXACT mobile target: 2 property columns */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%!important;
  }

  body#page-agency-profile .rpg-storefront__featured-grid > .property-item,
  body#page-agency-profile .rpg-storefront__property-grid > .property-item {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    border-radius:9px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"] {
    height:106px!important;
    min-height:106px!important;
    max-height:106px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content {
    padding:7px!important;
  }

  /* Override legacy V23 tiny 7.8px rules */
  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"] {
    font-size:12.5px!important;
    line-height:1.24!important;
    min-height:31px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"] {
    font-size:11px!important;
    line-height:1.25!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"] {
    font-size:10.8px!important;
    line-height:1.22!important;
  }

  /* Hide duplicated agency identity inside agency's own cards;
     keep price directly visible. */
  body#page-agency-profile .rpg-storefront .property-card-agent {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront .property-item > .archive-bottom {
    padding:6px 7px!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7 {
    font-size:12.5px!important;
    line-height:1.15!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-actions,
  body#page-agency-profile .rpg-storefront .property-contact-actions--card,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] {
    gap:4px!important;
    padding:0 7px 7px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button {
    min-height:31px!important;
    padding:0 3px!important;
    border-radius:7px!important;
    font-size:10.5px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action svg {
    width:12px!important;
    height:12px!important;
    min-width:12px!important;
  }

  /* Compact search/filter controls */
  body#page-agency-profile .rpg-storefront__filters {
    grid-template-columns:minmax(0,1fr) 84px!important;
    gap:5px!important;
    padding:6px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input {
    height:36px!important;
    min-height:36px!important;
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle {
    min-width:84px!important;
    min-height:36px!important;
    padding:0 7px!important;
    font-size:10.5px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid input,
  body#page-agency-profile .rpg-storefront__filter-grid select {
    height:35px!important;
    min-height:35px!important;
    font-size:10.5px!important;
  }

  /* Locations horizontal swipe */
  body#page-agency-profile .rpg-storefront__locations {
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    width:auto!important;
    margin:0 -10px!important;
    padding:1px 10px 6px!important;
    scrollbar-width:none!important;
  }

  body#page-agency-profile .rpg-storefront__locations::-webkit-scrollbar {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a {
    flex:0 0 auto!important;
  }

  body#page-agency-profile .rpg-profile__trust {
    grid-template-columns:1fr!important;
    gap:8px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3 {
    font-size:15.5px!important;
  }

  /* Similar Agencies horizontal cards */
  body#page-agency-profile .rpg-storefront__similar-grid {
    display:flex!important;
    grid-template-columns:none!important;
    gap:7px!important;
    overflow-x:auto!important;
    width:auto!important;
    max-width:none!important;
    margin:0 -10px!important;
    padding:1px 10px 6px!important;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:none!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid::-webkit-scrollbar {
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid > * {
    flex:0 0 76%!important;
    width:76%!important;
    max-width:270px!important;
    scroll-snap-align:start!important;
  }

  /* ============================================================
     MOBILE FOOTER — homepage-style closed accordions
     ============================================================ */
  body#page-agency-profile .rpg-market-footer {
    width:100%!important;
    margin:0!important;
    padding:18px 0 88px!important;
    background:#00523f!important;
    color:#fff!important;
  }

  body#page-agency-profile .rpg-market-footer > .container {
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0 10px!important;
  }

  body#page-agency-profile .rpg-market-footer__grid {
    display:block!important;
    width:100%!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-market-footer__brand {
    display:block!important;
    width:100%!important;
    margin:0 0 10px!important;
    padding:0 0 10px!important;
  }

  body#page-agency-profile .rpg-market-footer__brand p {
    max-width:300px!important;
    margin:7px 0!important;
    color:rgba(255,255,255,.76)!important;
    font-size:12px!important;
    line-height:1.42!important;
  }

  body#page-agency-profile .rpg-market-footer__logo img {
    max-height:36px!important;
    width:auto!important;
  }

  body#page-agency-profile .rpg-market-footer__contact {
    display:none!important;
  }

  body#page-agency-profile .rpg-market-footer__socials {
    display:flex!important;
    gap:8px!important;
    margin-top:8px!important;
  }

  body#page-agency-profile .rpg-market-footer__col {
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border-top:1px solid rgba(255,255,255,.13)!important;
  }

  body#page-agency-profile .rpg-market-footer__col h4 {
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    color:#fff!important;
    font-size:12px!important;
    line-height:1!important;
    font-weight:800!important;
    cursor:pointer!important;
  }

  body#page-agency-profile .rpg-market-footer__col h4::after {
    content:'+'!important;
    width:22px!important;
    height:22px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:50%!important;
    background:rgba(255,255,255,.10)!important;
    font-size:14px!important;
  }

  body#page-agency-profile .rpg-market-footer__col.is-v38-open h4::after {
    content:'−'!important;
  }

  body#page-agency-profile .rpg-market-footer__col > a {
    display:none!important;
    width:100%!important;
    padding:6px 0!important;
    color:rgba(255,255,255,.78)!important;
    font-size:12px!important;
    line-height:1.2!important;
  }

  body#page-agency-profile .rpg-market-footer__col.is-v38-open > a {
    display:block!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter {
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:12px 0 0!important;
    border-top:1px solid rgba(255,255,255,.13)!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter h4 {
    margin:0 0 5px!important;
    color:#fff!important;
    font-size:13px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter p {
    margin:0 0 8px!important;
    color:rgba(255,255,255,.76)!important;
    font-size:12px!important;
    line-height:1.42!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 39px!important;
    width:100%!important;
    overflow:hidden!important;
    border-radius:8px!important;
    background:#fff!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form input {
    width:100%!important;
    min-width:0!important;
    height:39px!important;
    padding:0 9px!important;
    border:0!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form button {
    width:39px!important;
    height:39px!important;
    border:0!important;
    background:#0ba35a!important;
    color:#fff!important;
  }

  body#page-agency-profile .rpg-market-footer__bottom {
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    margin-top:12px!important;
    padding-top:10px!important;
    border-top:1px solid rgba(255,255,255,.12)!important;
    color:rgba(255,255,255,.66)!important;
    font-size:10.5px!important;
    line-height:1.35!important;
  }

  /* Sticky agency Call + WhatsApp like approved visual */
  body#page-agency-profile .rpg-agency-v38-sticky-actions {
    position:fixed!important;
    left:7px!important;
    right:7px!important;
    bottom:max(7px,env(safe-area-inset-bottom))!important;
    z-index:10095!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    width:auto!important;
    min-width:0!important;
    padding:7px!important;
    border:1px solid rgba(4,110,67,.12)!important;
    border-radius:15px!important;
    background:rgba(255,255,255,.975)!important;
    box-shadow:0 14px 36px rgba(2,57,40,.20),0 4px 12px rgba(2,57,40,.08)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
  }

  body#page-agency-profile .rpg-agency-v38-sticky-actions a {
    width:100%!important;
    min-width:0!important;
    min-height:43px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    margin:0!important;
    padding:0 8px!important;
    overflow:hidden!important;
    border-radius:9px!important;
    color:#fff!important;
    text-decoration:none!important;
    font-size:11.5px!important;
    line-height:1!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  body#page-agency-profile .rpg-agency-v38-sticky-actions .is-call {
    background:#087746!important;
  }

  body#page-agency-profile .rpg-agency-v38-sticky-actions .is-whatsapp {
    background:#12b866!important;
  }

  body#page-agency-profile .rpg-agency-v38-sticky-actions svg {
    width:16px!important;
    height:16px!important;
    min-width:16px!important;
  }

  /* Disable V37 sticky duplicate if it exists */
  body#page-agency-profile .rpg-agency-v37-sticky-actions {
    display:none!important;
  }
}

@media (max-width:360px) {
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid {
    gap:5px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"] {
    height:98px!important;
    min-height:98px!important;
    max-height:98px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"] {
    font-size:12px!important;
  }
}


/* ===== CONSOLIDATED SOURCE V39 ===== */
/* ==========================================================================
   REAL PROPERTY GURU — AGENCY STOREFRONT RESPONSIVE POLISH V39
   Follow-up to V38.
   Scope: agency profile page only.
   Desktop >=1025px remains untouched.
   ========================================================================== */

@media (max-width:1024px){

  body#page-agency-profile{
    --rpg39-green:#087746;
    --rpg39-green-2:#12b866;
    --rpg39-deep:#064b38;
    --rpg39-text:#16251e;
    --rpg39-muted:#6e7b74;
    --rpg39-soft:#f5f9f7;
    --rpg39-line:#dfe9e3;
    --rpg39-shadow:0 8px 22px rgba(2,67,47,.065);
  }

  /* ----------------------------------------------------------
     GENERAL SECTION RHYTHM
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust{
    margin-bottom:12px!important;
    border-radius:15px!important;
    box-shadow:var(--rpg39-shadow)!important;
  }

  body#page-agency-profile .rpg-storefront__section-head{
    gap:8px!important;
    margin-bottom:11px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2{
    font-size:19px!important;
    line-height:1.16!important;
    font-weight:850!important;
    letter-spacing:-.01em!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > span,
  body#page-agency-profile .rpg-storefront__section-head > div > span{
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head p,
  body#page-agency-profile .rpg-storefront__richtext,
  body#page-agency-profile .rpg-storefront__richtext p{
    font-size:13px!important;
    line-height:1.5!important;
  }

  /* ----------------------------------------------------------
     HERO
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__cover{
    height:248px!important;
    min-height:248px!important;
    max-height:248px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    width:calc(100% - 30px)!important;
    margin-top:-44px!important;
    padding:18px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    font-size:24px!important;
  }

  body#page-agency-profile .rpg-storefront__badges span,
  body#page-agency-profile .rpg-storefront__specialties span{
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary{
    min-height:42px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     NAV
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__nav a{
    min-height:38px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     OVERVIEW STAT CARDS
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__insights > div{
    min-height:64px!important;
    padding:10px!important;
    background:linear-gradient(180deg,#fbfdfc,#f4f9f6)!important;
    box-shadow:0 4px 12px rgba(2,67,47,.035)!important;
  }

  body#page-agency-profile .rpg-storefront__insights strong{
    font-size:17px!important;
  }

  body#page-agency-profile .rpg-storefront__insights span{
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     CATEGORY CARDS
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__categories > a{
    min-height:74px!important;
    border-radius:11px!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong{
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__categories small{
    font-size:11px!important;
  }

  /* ----------------------------------------------------------
     PROPERTY CARD POLISH
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__featured-grid > .property-item,
  body#page-agency-profile .rpg-storefront__property-grid > .property-item{
    border-radius:12px!important;
    box-shadow:0 6px 17px rgba(2,67,47,.06)!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media{
    height:150px!important;
    min-height:150px!important;
    max-height:150px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content{
    padding:10px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    font-size:13.5px!important;
    line-height:1.3!important;
    min-height:35px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    font-size:12px!important;
    line-height:1.3!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"]{
    font-size:11.5px!important;
    line-height:1.25!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    font-size:14px!important;
    line-height:1.2!important;
    font-weight:900!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button{
    min-height:36px!important;
    font-size:11.5px!important;
    border-radius:8px!important;
  }

  /* ----------------------------------------------------------
     FILTER POLISH
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__filters{
    padding:10px!important;
    border-radius:12px!important;
    box-shadow:0 5px 14px rgba(2,67,47,.035)!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input{
    height:42px!important;
    min-height:42px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle{
    min-height:42px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a,
  body#page-agency-profile .rpg-storefront__transaction-tabs button{
    min-height:34px!important;
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid label > span{
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid input,
  body#page-agency-profile .rpg-storefront__filter-grid select{
    min-height:39px!important;
    height:39px!important;
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     TEAM / LOCATIONS / TRUST
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__empty-soft{
    min-height:62px!important;
    padding:13px!important;
    font-size:12px!important;
    line-height:1.45!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a{
    min-height:36px!important;
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-profile__trust{
    padding:18px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3{
    font-size:18px!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span{
    font-size:12px!important;
    line-height:1.5!important;
  }

  /* ----------------------------------------------------------
     SIMILAR AGENCIES
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__similar-grid > *{
    border-radius:13px!important;
    box-shadow:0 6px 17px rgba(2,67,47,.06)!important;
  }
}

/* ==========================================================================
   MOBILE ONLY
   ========================================================================== */
@media (max-width:576px){

  body#page-agency-profile{
    padding-bottom:84px!important;
  }

  /* HERO — slightly more breathing room than V38 */
  body#page-agency-profile .rpg-storefront__cover{
    height:170px!important;
    min-height:170px!important;
    max-height:170px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    width:calc(100% - 12px)!important;
    margin-top:-26px!important;
    padding:12px!important;
  }

  body#page-agency-profile .rpg-storefront__logo{
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
    min-height:58px!important;
    max-width:58px!important;
    max-height:58px!important;
    flex-basis:58px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    font-size:19px!important;
    line-height:1.14!important;
  }

  body#page-agency-profile .rpg-storefront__badges span,
  body#page-agency-profile .rpg-storefront__specialties span{
    font-size:10.8px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary{
    min-height:39px!important;
    font-size:11px!important;
  }

  /* NAV */
  body#page-agency-profile .rpg-storefront__nav a{
    min-height:38px!important;
    font-size:12px!important;
  }

  /* SECTIONS */
  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust{
    padding:12px!important;
    margin-bottom:10px!important;
    border-radius:13px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2{
    font-size:17px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > span,
  body#page-agency-profile .rpg-storefront__section-head > div > span{
    font-size:10.8px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head p,
  body#page-agency-profile .rpg-storefront__richtext,
  body#page-agency-profile .rpg-storefront__richtext p{
    font-size:12px!important;
  }

  /* OVERVIEW */
  body#page-agency-profile .rpg-storefront__insights{
    gap:7px!important;
  }

  body#page-agency-profile .rpg-storefront__insights > div{
    min-height:58px!important;
    padding:9px!important;
  }

  body#page-agency-profile .rpg-storefront__insights strong{
    font-size:16px!important;
  }

  body#page-agency-profile .rpg-storefront__insights span{
    font-size:11px!important;
  }

  /* CATEGORIES */
  body#page-agency-profile .rpg-storefront__categories{
    margin-inline:-12px!important;
    padding-inline:12px!important;
  }

  body#page-agency-profile .rpg-storefront__categories > a{
    flex-basis:122px!important;
    width:122px!important;
    min-height:64px!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong{
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__categories small{
    font-size:10.5px!important;
  }

  /* PROPERTY GRID — preserve 2 columns */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"]{
    height:120px!important;
    min-height:120px!important;
    max-height:120px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content{
    padding:8px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    font-size:13px!important;
    line-height:1.26!important;
    min-height:33px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    font-size:11.7px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"]{
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    font-size:13.5px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-actions,
  body#page-agency-profile .rpg-storefront .property-contact-actions--card,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"]{
    padding:0 8px 8px!important;
    gap:5px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button{
    min-height:35px!important;
    font-size:11px!important;
  }

  /* FILTERS */
  body#page-agency-profile .rpg-storefront__filters{
    grid-template-columns:minmax(0,1fr) 90px!important;
    padding:8px!important;
    gap:6px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input{
    min-height:39px!important;
    height:39px!important;
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle{
    min-width:90px!important;
    min-height:39px!important;
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a,
  body#page-agency-profile .rpg-storefront__transaction-tabs button{
    min-height:33px!important;
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }

  /* TEAM / LOCATIONS */
  body#page-agency-profile .rpg-storefront__empty-soft{
    min-height:58px!important;
    padding:12px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a{
    min-height:36px!important;
    padding-inline:10px!important;
    font-size:11.5px!important;
  }

  /* TRUST */
  body#page-agency-profile .rpg-profile__trust{
    padding:15px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3{
    font-size:16.5px!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span{
    font-size:12px!important;
  }

  /* SIMILAR AGENCIES */
  body#page-agency-profile .rpg-storefront__similar-grid{
    margin-inline:-12px!important;
    padding-inline:12px!important;
    gap:8px!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid > *{
    flex:0 0 80%!important;
    width:80%!important;
    max-width:285px!important;
  }

  /* FOOTER READABILITY */
  body#page-agency-profile .rpg-market-footer{
    padding-bottom:94px!important;
  }

  body#page-agency-profile .rpg-market-footer__brand p,
  body#page-agency-profile .rpg-market-footer__newsletter p{
    font-size:12px!important;
    line-height:1.5!important;
  }

  body#page-agency-profile .rpg-market-footer__col h4{
    min-height:44px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-market-footer__col > a{
    font-size:12px!important;
  }

  /* V39 sticky CTA */
  body#page-agency-profile .rpg-agency-v38-sticky-actions,
  body#page-agency-profile .rpg-agency-v37-sticky-actions{
    display:none!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    z-index:10150!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    padding:8px!important;
    border:1px solid rgba(4,110,67,.12)!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 16px 42px rgba(2,57,40,.22),0 4px 13px rgba(2,57,40,.10)!important;
    backdrop-filter:blur(16px)!important;
    -webkit-backdrop-filter:blur(16px)!important;
    transition:opacity .18s ease,transform .18s ease!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions.is-hidden{
    opacity:0!important;
    pointer-events:none!important;
    transform:translateY(18px)!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions a{
    min-height:46px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    padding:0 10px!important;
    border-radius:10px!important;
    color:#fff!important;
    text-decoration:none!important;
    font-size:12px!important;
    line-height:1!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions .is-call{
    background:#087746!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions .is-whatsapp{
    background:#12b866!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions svg{
    width:17px!important;
    height:17px!important;
    min-width:17px!important;
  }
}


/* ===== CONSOLIDATED SOURCE V40 ===== */
/* ==========================================================================
   REAL PROPERTY GURU — AGENCY STOREFRONT FINAL MOBILE/TABLET POLISH V40
   Additive layer on top of V38/V39.
   Desktop >= 1025px is intentionally untouched.
   ========================================================================== */

@media (max-width:1024px){

  /* ----------------------------------------------------------
     SECTION HIERARCHY
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust{
    margin-bottom:13px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head,
  body#page-agency-profile .rpg-storefront__section-head--row{
    margin-bottom:12px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2{
    font-size:19px!important;
    line-height:1.14!important;
    font-weight:900!important;
    letter-spacing:-.015em!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > span,
  body#page-agency-profile .rpg-storefront__section-head > div > span{
    font-size:11px!important;
    letter-spacing:.07em!important;
    font-weight:900!important;
  }

  body#page-agency-profile .rpg-storefront__reset-link{
    min-height:31px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0 9px!important;
    border-radius:8px!important;
    font-size:11px!important;
  }

  /* ----------------------------------------------------------
     HERO BREATHING ROOM
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__identity{
    padding-top:19px!important;
    padding-bottom:17px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    margin-top:7px!important;
    margin-bottom:6px!important;
  }

  body#page-agency-profile .rpg-storefront__badges,
  body#page-agency-profile .rpg-storefront__specialties{
    row-gap:6px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions{
    margin-top:12px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary{
    min-height:43px!important;
    font-size:12px!important;
    border-radius:10px!important;
  }

  /* ----------------------------------------------------------
     NAV TOUCH TARGETS
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__nav{
    box-shadow:0 7px 18px rgba(2,67,47,.075)!important;
  }

  body#page-agency-profile .rpg-storefront__nav a{
    min-height:40px!important;
    padding-inline:12px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__nav a.is-active{
    box-shadow:inset 0 0 0 1px rgba(8,119,70,.08)!important;
  }

  /* ----------------------------------------------------------
     FEATURED / INVENTORY SPACING
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    row-gap:10px!important;
  }

  /* ----------------------------------------------------------
     PROPERTY TYPOGRAPHY
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    font-size:13.5px!important;
    line-height:1.27!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    font-size:12px!important;
    line-height:1.3!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    font-size:14px!important;
  }

  /* ----------------------------------------------------------
     INVENTORY FILTER AREA
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head{
    padding-bottom:2px!important;
  }

  body#page-agency-profile .rpg-storefront__filters{
    margin-top:4px!important;
  }

  body#page-agency-profile .rpg-storefront__results-bar{
    min-height:34px!important;
    padding:0 2px!important;
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     PAGINATION
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__pagination{
    margin-top:15px!important;
  }

  body#page-agency-profile .rpg-storefront__pagination .pagination{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    gap:5px!important;
    margin:0!important;
  }

  body#page-agency-profile .rpg-storefront__pagination .page-link{
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    border-radius:8px!important;
    font-size:12px!important;
    line-height:1!important;
  }

  body#page-agency-profile .rpg-storefront__pagination .page-item.active .page-link{
    background:#087746!important;
    border-color:#087746!important;
    color:#fff!important;
    box-shadow:0 5px 12px rgba(8,119,70,.18)!important;
  }

  /* ----------------------------------------------------------
     TEAM / LOCATIONS
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__empty-soft{
    text-align:left!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a{
    padding-inline:11px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     TRUST & SAFETY
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-profile__trust{
    padding:19px!important;
    border-radius:16px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3{
    margin-bottom:8px!important;
    font-size:18px!important;
    line-height:1.18!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span{
    font-size:12.3px!important;
    line-height:1.52!important;
  }

  body#page-agency-profile .rpg-profile__trust a,
  body#page-agency-profile .rpg-profile__trust button{
    min-height:39px!important;
    border-radius:9px!important;
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     FOOTER READABILITY
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-market-footer__newsletter-form input{
    height:42px!important;
    min-height:42px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form button{
    height:42px!important;
    min-height:42px!important;
  }

  body#page-agency-profile .rpg-market-footer__bottom{
    margin-top:14px!important;
    padding-top:12px!important;
  }
}

@media (max-width:576px){

  /* ----------------------------------------------------------
     HERO
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__cover{
    height:174px!important;
    min-height:174px!important;
    max-height:174px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    margin-top:-27px!important;
    padding:13px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    font-size:19.5px!important;
    line-height:1.13!important;
  }

  body#page-agency-profile .rpg-storefront__badges span,
  body#page-agency-profile .rpg-storefront__specialties span{
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions{
    gap:6px!important;
    margin-top:10px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary{
    min-height:40px!important;
    padding-inline:6px!important;
    font-size:11.2px!important;
  }

  body#page-agency-profile .rpg-storefront__action-secondary{
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* ----------------------------------------------------------
     MOBILE NAV
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__nav .container{
    padding:6px!important;
  }

  body#page-agency-profile .rpg-storefront__nav a{
    min-height:40px!important;
    font-size:12px!important;
    padding-inline:11px!important;
  }

  /* ----------------------------------------------------------
     SECTION TITLES
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust{
    margin-bottom:11px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head,
  body#page-agency-profile .rpg-storefront__section-head--row{
    margin-bottom:10px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2{
    font-size:17.5px!important;
    line-height:1.15!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > span,
  body#page-agency-profile .rpg-storefront__section-head > div > span{
    font-size:10.8px!important;
  }

  /* ----------------------------------------------------------
     FEATURED / PROPERTY GRID
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    column-gap:7px!important;
    row-gap:9px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"]{
    height:122px!important;
    min-height:122px!important;
    max-height:122px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    min-height:34px!important;
    font-size:13.5px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"]{
    font-size:11.2px!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    font-size:14px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button{
    min-height:36px!important;
    font-size:11px!important;
  }

  /* ----------------------------------------------------------
     INVENTORY HEADER + FILTER TOOLBAR
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head{
    display:block!important;
    padding-bottom:0!important;
  }

  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head h2{
    max-width:92%!important;
    margin-bottom:5px!important;
  }

  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head p{
    max-width:95%!important;
    margin-top:4px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__filters{
    grid-template-columns:minmax(0,1fr) 92px!important;
    gap:6px!important;
    margin-top:7px!important;
    padding:8px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input{
    min-height:40px!important;
    height:40px!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle{
    min-width:92px!important;
    min-height:40px!important;
    font-size:11.2px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs{
    margin-top:2px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a,
  body#page-agency-profile .rpg-storefront__transaction-tabs button{
    min-height:34px!important;
    font-size:11.2px!important;
  }

  body#page-agency-profile .rpg-storefront__results-bar{
    margin:10px 0 9px!important;
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     PAGINATION
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__pagination .page-link{
    width:31px!important;
    min-width:31px!important;
    height:31px!important;
    min-height:31px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     TEAM / AREAS
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__empty-soft{
    min-height:60px!important;
    padding:12px 13px!important;
    font-size:12px!important;
    line-height:1.45!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a{
    min-height:37px!important;
    padding-inline:11px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     TRUST
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-profile__trust{
    padding:16px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3{
    font-size:17px!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span{
    font-size:12px!important;
    line-height:1.52!important;
  }

  /* ----------------------------------------------------------
     SIMILAR AGENCIES
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__similar-grid > *{
    flex:0 0 83%!important;
    width:83%!important;
    max-width:292px!important;
  }

  /* ----------------------------------------------------------
     FOOTER
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-market-footer__col h4{
    min-height:46px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-market-footer__brand p,
  body#page-agency-profile .rpg-market-footer__newsletter p{
    line-height:1.52!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter{
    padding-top:14px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form input,
  body#page-agency-profile .rpg-market-footer__newsletter-form button{
    height:42px!important;
    min-height:42px!important;
  }

  /* ----------------------------------------------------------
     STICKY CALL / WHATSAPP
     Keep V39 implementation but make it unmistakable.
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-agency-v39-sticky-actions{
    left:9px!important;
    right:9px!important;
    bottom:max(9px,env(safe-area-inset-bottom))!important;
    padding:8px!important;
    border-radius:19px!important;
    box-shadow:0 18px 46px rgba(2,57,40,.24),0 5px 15px rgba(2,57,40,.11)!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions a{
    min-height:47px!important;
    font-size:12px!important;
  }
}


/* ===== CONSOLIDATED SOURCE V41 ===== */
/* ==========================================================================
   REAL PROPERTY GURU — AGENCY STOREFRONT VISUAL REFINEMENT V41
   Additive polish layer on top of V38/V39/V40.
   Scope: agency profile only.
   Desktop >=1025px remains untouched.
   ========================================================================== */

@media (max-width:1024px){

  /* ============================================================
     CORE PAGE RHYTHM
     ============================================================ */
  body#page-agency-profile .rpg-storefront__layout{
    padding-top:14px!important;
  }

  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust{
    margin-bottom:14px!important;
    border-radius:16px!important;
    box-shadow:0 9px 24px rgba(2,67,47,.07)!important;
  }

  body#page-agency-profile .rpg-storefront__section-head,
  body#page-agency-profile .rpg-storefront__section-head--row{
    margin-bottom:13px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2{
    font-size:19.5px!important;
    line-height:1.15!important;
    font-weight:900!important;
    letter-spacing:-.018em!important;
  }

  body#page-agency-profile .rpg-storefront__section-head > span,
  body#page-agency-profile .rpg-storefront__section-head > div > span{
    margin-bottom:4px!important;
    font-size:11px!important;
    font-weight:900!important;
    letter-spacing:.075em!important;
  }

  body#page-agency-profile .rpg-storefront__section-head p,
  body#page-agency-profile .rpg-storefront__richtext,
  body#page-agency-profile .rpg-storefront__richtext p{
    color:#66746d!important;
    font-size:13px!important;
    line-height:1.52!important;
  }

  /* ============================================================
     HERO BALANCE
     ============================================================ */
  body#page-agency-profile .rpg-storefront__cover{
    height:255px!important;
    min-height:255px!important;
    max-height:255px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    width:calc(100% - 28px)!important;
    margin-top:-42px!important;
    padding:20px!important;
    border-radius:18px!important;
  }

  body#page-agency-profile .rpg-storefront__identity-top{
    gap:14px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    margin:8px 0 7px!important;
    font-size:24.5px!important;
    line-height:1.13!important;
  }

  body#page-agency-profile .rpg-storefront__badges,
  body#page-agency-profile .rpg-storefront__specialties{
    gap:6px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions{
    gap:8px!important;
    margin-top:13px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary{
    min-height:44px!important;
    border-radius:10px!important;
    font-size:12px!important;
  }

  /* ============================================================
     PROFILE NAV
     ============================================================ */
  body#page-agency-profile .rpg-storefront__nav .container{
    padding-block:7px!important;
  }

  body#page-agency-profile .rpg-storefront__nav a{
    min-height:41px!important;
    padding-inline:13px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__nav a.is-active{
    background:#e8f6ee!important;
    color:#087746!important;
    box-shadow:inset 0 0 0 1px rgba(8,119,70,.10)!important;
  }

  /* ============================================================
     OVERVIEW
     ============================================================ */
  body#page-agency-profile .rpg-storefront__insights{
    gap:8px!important;
    margin-top:10px!important;
  }

  body#page-agency-profile .rpg-storefront__insights > div{
    min-height:66px!important;
    padding:11px!important;
    border-radius:11px!important;
    background:linear-gradient(180deg,#fbfdfc,#f2f8f5)!important;
  }

  body#page-agency-profile .rpg-storefront__insights strong{
    font-size:17.5px!important;
  }

  body#page-agency-profile .rpg-storefront__insights span{
    font-size:11.8px!important;
  }

  /* ============================================================
     CATEGORY CARDS
     ============================================================ */
  body#page-agency-profile .rpg-storefront__categories > a{
    min-height:76px!important;
    border-radius:12px!important;
    box-shadow:0 5px 14px rgba(2,67,47,.04)!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong{
    font-size:12.2px!important;
  }

  body#page-agency-profile .rpg-storefront__categories small{
    font-size:11px!important;
  }

  /* ============================================================
     FEATURED + INVENTORY CARD POLISH
     ============================================================ */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    column-gap:10px!important;
    row-gap:11px!important;
  }

  body#page-agency-profile .rpg-storefront__featured-grid > .property-item,
  body#page-agency-profile .rpg-storefront__property-grid > .property-item{
    border-radius:13px!important;
    box-shadow:0 7px 19px rgba(2,67,47,.065)!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media{
    height:154px!important;
    min-height:154px!important;
    max-height:154px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content{
    padding:10px 10px 9px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    min-height:36px!important;
    font-size:14px!important;
    line-height:1.28!important;
    font-weight:850!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    color:#67756e!important;
    font-size:12px!important;
    line-height:1.32!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"]{
    color:#5e6d65!important;
    font-size:11.6px!important;
    line-height:1.28!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    margin-top:2px!important;
    color:#087746!important;
    font-size:14.5px!important;
    font-weight:900!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-actions,
  body#page-agency-profile .rpg-storefront .property-contact-actions--card,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"]{
    gap:6px!important;
    padding:0 10px 10px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button{
    min-height:38px!important;
    border-radius:8px!important;
    font-size:11.5px!important;
  }

  /* ============================================================
     INVENTORY HEADER + FILTER TOOLBAR
     ============================================================ */
  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head{
    margin-bottom:11px!important;
    padding-bottom:2px!important;
  }

  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head h2{
    margin-bottom:5px!important;
  }

  body#page-agency-profile .rpg-storefront__filters{
    grid-template-columns:minmax(0,2.3fr) minmax(100px,.8fr)!important;
    gap:8px!important;
    padding:10px!important;
    border-radius:13px!important;
    background:#f8fbf9!important;
    box-shadow:0 6px 16px rgba(2,67,47,.045)!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input{
    min-height:42px!important;
    height:42px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle{
    min-width:100px!important;
    min-height:42px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs{
    gap:6px!important;
    margin-top:2px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a,
  body#page-agency-profile .rpg-storefront__transaction-tabs button{
    min-height:35px!important;
    padding-inline:11px!important;
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__results-bar{
    min-height:36px!important;
    margin:11px 0 10px!important;
    font-size:11.8px!important;
  }

  /* ============================================================
     PAGINATION
     ============================================================ */
  body#page-agency-profile .rpg-storefront__pagination{
    margin-top:16px!important;
  }

  body#page-agency-profile .rpg-storefront__pagination .page-link{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }

  /* ============================================================
     TEAM / AREAS
     ============================================================ */
  body#page-agency-profile .rpg-storefront__empty-soft{
    min-height:64px!important;
    padding:13px 14px!important;
    font-size:12.2px!important;
    line-height:1.48!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a{
    min-height:38px!important;
    padding-inline:12px!important;
    font-size:12px!important;
  }

  /* ============================================================
     TRUST & SAFETY
     ============================================================ */
  body#page-agency-profile .rpg-profile__trust{
    padding:20px!important;
    border-radius:17px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3{
    margin-bottom:9px!important;
    font-size:18.5px!important;
    line-height:1.18!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span{
    font-size:12.5px!important;
    line-height:1.55!important;
  }

  body#page-agency-profile .rpg-profile__trust a,
  body#page-agency-profile .rpg-profile__trust button{
    min-height:40px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }

  /* ============================================================
     SIMILAR AGENCIES
     ============================================================ */
  body#page-agency-profile .rpg-storefront__similar-grid > *{
    border-radius:14px!important;
    box-shadow:0 7px 19px rgba(2,67,47,.065)!important;
  }

  /* ============================================================
     FOOTER
     ============================================================ */
  body#page-agency-profile .rpg-market-footer__brand{
    padding-bottom:12px!important;
  }

  body#page-agency-profile .rpg-market-footer__brand p{
    margin-top:8px!important;
  }

  body#page-agency-profile .rpg-market-footer__col h4{
    min-height:47px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter{
    padding-top:15px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form input,
  body#page-agency-profile .rpg-market-footer__newsletter-form button{
    height:43px!important;
    min-height:43px!important;
  }
}

/* ==========================================================================
   MOBILE <=576px
   ========================================================================== */
@media (max-width:576px){

  /* ----------------------------------------------------------
     HERO — keep same structure, improve balance
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__cover{
    height:186px!important;
    min-height:186px!important;
    max-height:186px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    width:calc(100% - 12px)!important;
    margin-top:-29px!important;
    padding:14px!important;
  }

  body#page-agency-profile .rpg-storefront__logo{
    width:60px!important;
    height:60px!important;
    min-width:60px!important;
    min-height:60px!important;
    max-width:60px!important;
    max-height:60px!important;
    flex-basis:60px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    margin:5px 0!important;
    font-size:20px!important;
    line-height:1.13!important;
  }

  body#page-agency-profile .rpg-storefront__badges span,
  body#page-agency-profile .rpg-storefront__specialties span{
    font-size:11px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions{
    gap:6px!important;
    margin-top:11px!important;
  }

  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,
  body#page-agency-profile .rpg-storefront__action-secondary{
    min-height:41px!important;
    padding-inline:6px!important;
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     NAV
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__nav a{
    min-height:42px!important;
    padding-inline:12px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     SECTION HIERARCHY
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__section,
  body#page-agency-profile .rpg-profile__trust{
    margin-bottom:12px!important;
    padding:13px!important;
    border-radius:14px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head,
  body#page-agency-profile .rpg-storefront__section-head--row{
    margin-bottom:11px!important;
  }

  body#page-agency-profile .rpg-storefront__section-head h2{
    font-size:18px!important;
    line-height:1.14!important;
  }

  body#page-agency-profile .rpg-storefront__section-head p{
    font-size:12.2px!important;
    line-height:1.48!important;
  }

  /* ----------------------------------------------------------
     CATEGORIES
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__categories{
    margin-inline:-13px!important;
    padding-inline:13px!important;
    gap:7px!important;
  }

  body#page-agency-profile .rpg-storefront__categories > a{
    flex-basis:126px!important;
    width:126px!important;
    min-height:66px!important;
    padding:8px!important;
  }

  body#page-agency-profile .rpg-storefront__categories strong{
    font-size:11.8px!important;
  }

  body#page-agency-profile .rpg-storefront__categories small{
    font-size:10.8px!important;
  }

  /* ----------------------------------------------------------
     PROPERTY CARDS — keep 2-column grid, improve readability
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    column-gap:8px!important;
    row-gap:10px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"]{
    height:128px!important;
    min-height:128px!important;
    max-height:128px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content{
    padding:8px 8px 7px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    min-height:34px!important;
    font-size:13.5px!important;
    line-height:1.27!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    font-size:12px!important;
    line-height:1.28!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .meta-list,
  body#page-agency-profile .rpg-storefront .property-item [class*="meta"]{
    font-size:11.5px!important;
    line-height:1.25!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-item [class*="price"],
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    font-size:14.5px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-actions,
  body#page-agency-profile .rpg-storefront .property-contact-actions--card,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"]{
    gap:5px!important;
    padding:0 8px 8px!important;
  }

  body#page-agency-profile .rpg-storefront .property-contact-action,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] a,
  body#page-agency-profile .rpg-storefront .property-item [class*="actions"] button{
    min-height:38px!important;
    font-size:11.5px!important;
  }

  /* ----------------------------------------------------------
     INVENTORY HEADER / FILTER
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head{
    display:block!important;
    margin-bottom:10px!important;
  }

  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head h2{
    max-width:100%!important;
    margin-bottom:6px!important;
  }

  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head p{
    max-width:100%!important;
    margin-top:4px!important;
  }

  body#page-agency-profile .rpg-storefront__filters{
    grid-template-columns:minmax(0,2.35fr) minmax(92px,.85fr)!important;
    gap:6px!important;
    margin-top:7px!important;
    padding:8px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-search input{
    min-height:41px!important;
    height:41px!important;
    font-size:11.8px!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle{
    min-width:92px!important;
    min-height:41px!important;
    font-size:11.5px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs{
    gap:6px!important;
    margin-top:3px!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a,
  body#page-agency-profile .rpg-storefront__transaction-tabs button{
    min-height:35px!important;
    font-size:11.3px!important;
  }

  body#page-agency-profile .rpg-storefront__results-bar{
    min-height:35px!important;
    margin:10px 0!important;
    font-size:11.7px!important;
  }

  /* ----------------------------------------------------------
     PAGINATION
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__pagination .page-link{
    width:33px!important;
    min-width:33px!important;
    height:33px!important;
    min-height:33px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     TEAM / AREAS
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__empty-soft{
    min-height:62px!important;
    padding:13px!important;
    font-size:12px!important;
    line-height:1.48!important;
  }

  body#page-agency-profile .rpg-storefront__locations > a{
    min-height:38px!important;
    padding-inline:12px!important;
    font-size:12px!important;
  }

  /* ----------------------------------------------------------
     TRUST & SAFETY
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-profile__trust{
    padding:17px!important;
  }

  body#page-agency-profile .rpg-profile__trust h3{
    font-size:17.5px!important;
    line-height:1.18!important;
  }

  body#page-agency-profile .rpg-profile__trust p,
  body#page-agency-profile .rpg-profile__trust-points span{
    font-size:12.2px!important;
    line-height:1.55!important;
  }

  body#page-agency-profile .rpg-profile__trust a,
  body#page-agency-profile .rpg-profile__trust button{
    min-height:40px!important;
    font-size:11.8px!important;
  }

  /* ----------------------------------------------------------
     SIMILAR AGENCIES
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-storefront__similar-grid{
    margin-inline:-13px!important;
    padding-inline:13px!important;
    gap:9px!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid > *{
    flex:0 0 85%!important;
    width:85%!important;
    max-width:300px!important;
  }

  /* ----------------------------------------------------------
     FOOTER
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-market-footer__brand{
    padding-bottom:13px!important;
  }

  body#page-agency-profile .rpg-market-footer__col h4{
    min-height:47px!important;
    font-size:12px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter{
    padding-top:15px!important;
  }

  body#page-agency-profile .rpg-market-footer__newsletter-form input,
  body#page-agency-profile .rpg-market-footer__newsletter-form button{
    min-height:43px!important;
    height:43px!important;
  }

  /* ----------------------------------------------------------
     STICKY CTA — keep V39/V40 behavior, refine appearance
     ---------------------------------------------------------- */
  body#page-agency-profile .rpg-agency-v39-sticky-actions{
    left:9px!important;
    right:9px!important;
    bottom:max(9px,env(safe-area-inset-bottom))!important;
    padding:8px!important;
    border-radius:19px!important;
    box-shadow:0 18px 48px rgba(2,57,40,.24),0 5px 15px rgba(2,57,40,.11)!important;
  }

  body#page-agency-profile .rpg-agency-v39-sticky-actions a{
    min-height:47px!important;
    font-size:12px!important;
  }
}


/* ==========================================================================\n   RPG AGENCY CONSOLIDATED FINAL V42 — FINAL OVERRIDES\n   Loaded after legacy V23. Desktop >=1025px remains untouched.\n   ========================================================================== */\n@media (max-width:1024px){\n  body#page-agency-profile .rpg-storefront__section,\n  body#page-agency-profile .rpg-profile__trust{\n    margin-bottom:14px!important;\n    border-radius:16px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__section-head,\n  body#page-agency-profile .rpg-storefront__section-head--row{\n    margin-bottom:13px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__section-head h2{\n    font-size:19.5px!important;\n    line-height:1.15!important;\n    font-weight:900!important;\n    letter-spacing:-.018em!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__nav a{\n    min-height:41px!important;\n    font-size:12px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__nav a.is-active{\n    position:relative!important;\n    background:#e6f6ed!important;\n    color:#087746!important;\n    box-shadow:inset 0 0 0 1px rgba(8,119,70,.10)!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__nav a.is-active::after{\n    content:\"\"!important;\n    position:absolute!important;\n    left:11px!important;\n    right:11px!important;\n    bottom:3px!important;\n    height:2px!important;\n    border-radius:999px!important;\n    background:#087746!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head{\n    margin-bottom:12px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__filters{\n    margin-top:8px!important;\n    margin-bottom:8px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__results-bar{\n    margin:11px 0 10px!important;\n  }\n\n  body#page-agency-profile .rpg-profile__trust{\n    padding:20px!important;\n  }\n\n  body#page-agency-profile .rpg-profile__trust h3{\n    font-size:18.5px!important;\n    line-height:1.18!important;\n  }\n\n  body#page-agency-profile .rpg-profile__trust p,\n  body#page-agency-profile .rpg-profile__trust-points span{\n    font-size:12.5px!important;\n    line-height:1.55!important;\n  }\n}\n\n@media (max-width:576px){\n  body#page-agency-profile .rpg-storefront__cover{\n    height:188px!important;\n    min-height:188px!important;\n    max-height:188px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__identity{\n    margin-top:-30px!important;\n    padding:14px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__title h1{\n    font-size:20px!important;\n    line-height:1.13!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__hero-actions .rpg-directory-action,\n  body#page-agency-profile .rpg-storefront__action-secondary{\n    min-height:41px!important;\n    font-size:11.5px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__nav a{\n    min-height:42px!important;\n    padding-inline:12px!important;\n    font-size:12px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__section-head h2{\n    font-size:18px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__categories > a{\n    flex:0 0 128px!important;\n    width:128px!important;\n    min-height:67px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__featured-grid,\n  body#page-agency-profile .rpg-storefront__property-grid{\n    grid-template-columns:repeat(2,minmax(0,1fr))!important;\n    column-gap:8px!important;\n    row-gap:10px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront .property-item .images-group,\n  body#page-agency-profile .rpg-storefront .property-item .images-style,\n  body#page-agency-profile .rpg-storefront .property-item .media,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"image\"]{\n    height:130px!important;\n    min-height:130px!important;\n    max-height:130px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront .property-item .content .link,\n  body#page-agency-profile .rpg-storefront .property-item h2,\n  body#page-agency-profile .rpg-storefront .property-item h3,\n  body#page-agency-profile .rpg-storefront .property-item h4,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"title\"]{\n    min-height:35px!important;\n    font-size:14px!important;\n    line-height:1.27!important;\n  }\n\n  body#page-agency-profile .rpg-storefront .property-item .desc,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"location\"]{\n    font-size:12px!important;\n    color:#5f6e66!important;\n  }\n\n  body#page-agency-profile .rpg-storefront .property-item .meta-list,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"meta\"]{\n    font-size:11.5px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront .property-card-price,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"price\"],\n  body#page-agency-profile .rpg-storefront .property-card-price .h6,\n  body#page-agency-profile .rpg-storefront .property-card-price .h7{\n    font-size:15px!important;\n    font-weight:900!important;\n  }\n\n  body#page-agency-profile .rpg-storefront .property-contact-action,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"actions\"] a,\n  body#page-agency-profile .rpg-storefront .property-item [class*=\"actions\"] button{\n    min-height:38px!important;\n    font-size:11.5px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__inventory .rpg-storefront__section-head{\n    display:block!important;\n    margin-bottom:12px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__filters{\n    grid-template-columns:minmax(0,2.45fr) minmax(94px,.85fr)!important;\n    gap:7px!important;\n    margin-top:8px!important;\n    padding:9px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__filter-search input,\n  body#page-agency-profile .rpg-storefront__v38-filter-toggle{\n    min-height:42px!important;\n    height:42px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__results-bar{\n    min-height:36px!important;\n    margin:11px 0 10px!important;\n    font-size:11.8px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__pagination .page-link{\n    width:34px!important;\n    min-width:34px!important;\n    height:34px!important;\n    min-height:34px!important;\n    font-size:12px!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__locations > a{\n    min-height:38px!important;\n    font-size:12px!important;\n  }\n\n  body#page-agency-profile .rpg-profile__trust{\n    padding:18px!important;\n  }\n\n  body#page-agency-profile .rpg-profile__trust h3{\n    font-size:17.5px!important;\n  }\n\n  body#page-agency-profile .rpg-profile__trust p,\n  body#page-agency-profile .rpg-profile__trust-points span{\n    font-size:12.2px!important;\n    line-height:1.55!important;\n  }\n\n  body#page-agency-profile .rpg-storefront__similar-grid > *{\n    flex:0 0 86%!important;\n    width:86%!important;\n    max-width:305px!important;\n  }\n\n  body#page-agency-profile .rpg-market-footer__col h4{\n    min-height:47px!important;\n    font-size:12px!important;\n  }\n\n  body#page-agency-profile .rpg-market-footer__newsletter-form input,\n  body#page-agency-profile .rpg-market-footer__newsletter-form button{\n    height:43px!important;\n    min-height:43px!important;\n  }\n}\n

/* ==========================================================================
   RPG AGENCY NEXT PASS V43 — TABLET + INTERACTION REFINEMENT
   Replaces V42 loader; does not stack another live responsive layer.
   Desktop >=1025px remains untouched.
   ========================================================================== */

/* ---------- Compact mobile page entry ---------- */
@media (max-width:576px){
  body#page-agency-profile .rpg-storefront__hero{
    padding-top:2px!important;
  }

  body#page-agency-profile .rpg-storefront__hero > .container{
    padding-top:0!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    box-shadow:
      0 16px 36px rgba(2,65,45,.11),
      0 3px 10px rgba(2,65,45,.05)!important;
  }

  /* Stronger active profile tab */
  body#page-agency-profile .rpg-storefront__nav a.is-active{
    background:#dff3e8!important;
    color:#066d40!important;
    font-weight:900!important;
  }

  body#page-agency-profile .rpg-storefront__nav a.is-active::after{
    left:10px!important;
    right:10px!important;
    bottom:2px!important;
    height:3px!important;
  }

  /* Keep property titles/locations predictable in 2-column cards */
  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4,
  body#page-agency-profile .rpg-storefront .property-item [class*="title"]{
    display:-webkit-box!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    text-overflow:ellipsis!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .desc,
  body#page-agency-profile .rpg-storefront .property-item [class*="location"]{
    display:-webkit-box!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:1!important;
    text-overflow:ellipsis!important;
  }

  /* Badges stay compact and never dominate image */
  body#page-agency-profile .rpg-storefront .property-item .tag,
  body#page-agency-profile .rpg-storefront .property-item [class*="badge"],
  body#page-agency-profile .rpg-storefront .property-item [class*="status"]{
    max-width:76px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:1!important;
  }

  /* Inventory controls get clearer visual grouping */
  body#page-agency-profile .rpg-storefront__filters{
    border:1px solid #dbe7e0!important;
    background:#fbfdfc!important;
    box-shadow:0 5px 15px rgba(2,67,47,.04)!important;
  }

  body#page-agency-profile .rpg-storefront__v38-filter-toggle[aria-expanded="true"]{
    border-color:#087746!important;
    background:#e7f5ed!important;
    color:#066d40!important;
  }

  body#page-agency-profile .rpg-storefront__transaction-tabs a.is-active,
  body#page-agency-profile .rpg-storefront__transaction-tabs button.is-active,
  body#page-agency-profile .rpg-storefront__transaction-tabs .active{
    background:#087746!important;
    color:#fff!important;
    border-color:#087746!important;
  }

  /* More breathing room after final property card before pagination */
  body#page-agency-profile .rpg-storefront__property-grid{
    margin-bottom:4px!important;
  }

  /* Similar agency swipe hint */
  body#page-agency-profile .rpg-storefront__similar-grid{
    scroll-padding-left:13px!important;
  }

  /* Footer: only one accordion body visually active */
  body#page-agency-profile .rpg-market-footer__col.is-v43-open > a{
    display:block!important;
  }

  body#page-agency-profile .rpg-market-footer__col.is-v43-open h4::after{
    content:'−'!important;
  }

  /* Keep legacy open class compatible */
  body#page-agency-profile .rpg-market-footer__col.is-v38-open > a{
    display:block!important;
  }
}

/* ==========================================================================
   SMALL TABLET / LARGE PHONE: 577–767px
   Keep 2 columns so cards remain readable.
   ========================================================================== */
@media (min-width:577px) and (max-width:767px){
  body#page-agency-profile .rpg-storefront__cover{
    height:205px!important;
    min-height:205px!important;
    max-height:205px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    width:calc(100% - 22px)!important;
    margin-top:-34px!important;
    padding:16px!important;
  }

  body#page-agency-profile .rpg-storefront__title h1{
    font-size:22px!important;
  }

  body#page-agency-profile .rpg-storefront__stats,
  body#page-agency-profile .rpg-storefront__insights{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }

  body#page-agency-profile .rpg-storefront__categories{
    display:flex!important;
    grid-template-columns:none!important;
    gap:8px!important;
    overflow-x:auto!important;
    padding-bottom:6px!important;
    scrollbar-width:none!important;
  }

  body#page-agency-profile .rpg-storefront__categories::-webkit-scrollbar{
    display:none!important;
  }

  body#page-agency-profile .rpg-storefront__categories > a{
    flex:0 0 145px!important;
    width:145px!important;
  }

  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"]{
    height:170px!important;
    min-height:170px!important;
    max-height:170px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .content .link,
  body#page-agency-profile .rpg-storefront .property-item h2,
  body#page-agency-profile .rpg-storefront .property-item h3,
  body#page-agency-profile .rpg-storefront .property-item h4{
    font-size:14px!important;
  }

  body#page-agency-profile .rpg-storefront .property-card-price,
  body#page-agency-profile .rpg-storefront .property-card-price .h6,
  body#page-agency-profile .rpg-storefront .property-card-price .h7{
    font-size:15px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    overflow:visible!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid > *{
    width:100%!important;
    max-width:100%!important;
  }
}

/* ==========================================================================
   TABLET: 768–1024px
   3-column cards with more generous sizing.
   ========================================================================== */
@media (min-width:768px) and (max-width:1024px){
  body#page-agency-profile .rpg-storefront__cover{
    height:270px!important;
    min-height:270px!important;
    max-height:270px!important;
  }

  body#page-agency-profile .rpg-storefront__identity{
    width:calc(100% - 42px)!important;
    margin-top:-50px!important;
    padding:20px!important;
  }

  body#page-agency-profile .rpg-storefront__featured-grid,
  body#page-agency-profile .rpg-storefront__property-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
  }

  body#page-agency-profile .rpg-storefront .property-item .images-group,
  body#page-agency-profile .rpg-storefront .property-item .images-style,
  body#page-agency-profile .rpg-storefront .property-item .media,
  body#page-agency-profile .rpg-storefront .property-item [class*="image"]{
    height:165px!important;
    min-height:165px!important;
    max-height:165px!important;
  }

  body#page-agency-profile .rpg-storefront__filter-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  body#page-agency-profile .rpg-storefront__similar-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  body#page-agency-profile .rpg-profile__trust{
    grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)!important;
  }
}


/* BPP_AGENCY_PROFILE_MOBILE_ONE_COLUMN_V1_START */
@media (max-width: 767.98px) {
    /*
     * Agency profile mobile only.
     * Keep existing property cards exactly as designed;
     * only make both agency property grids one card per row.
     */
    .rpg-storefront .rpg-storefront__featured-grid,
    .rpg-storefront .rpg-storefront__property-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        align-items: stretch !important;
    }

    .rpg-storefront .rpg-storefront__featured-grid > *,
    .rpg-storefront .rpg-storefront__property-grid > * {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .rpg-storefront .rpg-storefront__featured-grid > .property-item,
    .rpg-storefront .rpg-storefront__property-grid > .property-item,
    .rpg-storefront .rpg-storefront__featured-grid .property-item.homeya-box,
    .rpg-storefront .rpg-storefront__property-grid .property-item.homeya-box {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /*
     * Safety for an intermediate Bootstrap/grid column wrapper,
     * without altering property card internals.
     */
    .rpg-storefront .rpg-storefront__featured-grid > [class*="col"],
    .rpg-storefront .rpg-storefront__property-grid > [class*="col"] {
        grid-column: 1 / -1 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}
/* BPP_AGENCY_PROFILE_MOBILE_ONE_COLUMN_V1_END */
