/* JobLik 0.33.612 — MOBILE GALLERY FLOW-DOTS + TOUCH-SWIPE OWNER.
   Scope is strictly /gallery unified mobile <=900px.
   Desktop geometry/filter owner is intentionally untouched. */
@media (max-width:900px){
  html body .v064-home.j515-unified-gallery{
    width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow-x:hidden!important;background:#fff!important;
  }
  html body .v064-home.j515-unified-gallery #featured,
  html body .v064-home.j515-unified-gallery .v064-featured{
    display:block!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0 10px!important;background:#fff!important;overflow:visible!important;
  }
  html body .v064-home.j515-unified-gallery .v064-cars-row.apg-grid.card-view-medium{
    display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important;
  }
  html body .v064-home.j515-unified-gallery .v064-cars-row.apg-grid.card-view-medium>.apg-card{
    position:relative!important;display:grid!important;grid-template-columns:52% 48%!important;grid-template-rows:180px!important;
    width:100%!important;height:180px!important;min-height:180px!important;max-height:180px!important;margin:0!important;padding:0!important;
    border:0!important;border-bottom:1px solid #efc5a6!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;overflow:hidden!important;direction:ltr!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media{
    position:relative!important;grid-column:1!important;grid-row:1!important;width:100%!important;height:180px!important;min-height:180px!important;max-height:180px!important;
    margin:0!important;padding:0 0 26px!important;box-sizing:border-box!important;background:#fff!important;overflow:hidden!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media .apg-media-slider{
    display:block!important;width:100%!important;height:146px!important;min-height:146px!important;max-height:146px!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#eef1f3!important;touch-action:pan-y!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media .apg-media-slider>img{
    display:none!important;width:100%!important;height:146px!important;min-height:146px!important;max-height:146px!important;margin:0!important;padding:0!important;object-fit:cover!important;object-position:center!important;border-radius:7px!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media .apg-media-slider>img.is-active{display:block!important}
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media .apg-media-dots{
    display:flex!important;position:static!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;gap:2px!important;width:100%!important;height:8px!important;min-height:8px!important;max-height:8px!important;margin:0!important;padding:0!important;align-items:center!important;justify-content:center!important;z-index:auto!important;background:#fff!important;overflow:hidden!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media .apg-media-dots i{display:block!important;width:4px!important;height:4px!important;border-radius:50%!important;background:#4e5963!important;margin:0!important}
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media .apg-media-dots i.is-active{background:#ef6517!important}

  html body .v064-home.j515-unified-gallery .apg-card>.apg-body{
    position:relative!important;grid-column:2!important;grid-row:1!important;display:block!important;width:100%!important;height:180px!important;min-height:180px!important;max-height:180px!important;
    margin:0!important;padding:4px 10px 4px 6px!important;box-sizing:border-box!important;background:#fff!important;overflow:hidden!important;direction:rtl!important;text-align:right!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card .jam-mobile-card-copy{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:space-between!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;gap:0!important;overflow:hidden!important;direction:rtl!important;text-align:right!important;
  }
  html body .v064-home.j515-unified-gallery .apg-card .j541-card-middle{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:stretch!important;margin:0!important;padding:0!important}
  html body .v064-home.j515-unified-gallery .apg-card .j541-card-bottom{display:flex!important;flex-direction:column!important;justify-content:flex-end!important;align-items:stretch!important;margin:0!important;padding:0!important}
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line{display:block!important;width:100%!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;padding:0!important}
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line-title{font-size:15.5px!important;font-weight:900!important;line-height:24px!important;color:#e96b17!important;margin:0 0 5px!important}
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line-spec,
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line-condition{font-size:12.5px!important;font-weight:700!important;line-height:22px!important;color:#171717!important}
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line-price{font-size:14px!important;font-weight:900!important;line-height:24px!important;color:#111!important;margin-top:2px!important}
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line-location{font-size:11.5px!important;font-weight:800!important;line-height:18px!important;color:#50545a!important;margin-top:auto!important}
  html body .v064-home.j515-unified-gallery .apg-card .jam-card-line-date{font-size:10.5px!important;font-weight:600!important;line-height:17px!important;color:#68727d!important;padding-bottom:2px!important}

  /* Restore the original mobile status controls that live inside media. */
  html body .v064-home.j515-unified-gallery .apg-card>.j538-card-footer,
  html body .v064-home.j515-unified-gallery .apg-card .j524-desktop-status,
  html body .v064-home.j515-unified-gallery .apg-card .j139-card-status{display:none!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save,
  html body .v064-home.j515-unified-gallery .apg-card .apg-approved,
  html body .v064-home.j515-unified-gallery .apg-card .apg-click-count{display:flex!important;position:absolute!important;bottom:0!important;height:26px!important;align-items:center!important;z-index:12!important;background:#fff!important;box-sizing:border-box!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-click-count{left:0!important;width:33.333%!important;justify-content:center!important;color:#ef6517!important;font-size:12px!important;font-weight:800!important;border-right:1px solid #edf0f2!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-click-count::before{content:'◉'!important;font-size:15px!important;margin-right:5px!important;color:#ef6517!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save{left:33.333%!important;width:33.333%!important;justify-content:center!important;color:#4d5660!important;border:0!important;border-right:1px solid #edf0f2!important;border-left:1px solid #edf0f2!important;padding:0!important;margin:0!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save svg{display:block!important;width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save.is-saved{color:#ef6517!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save.is-saved svg{fill:#ef6517!important;stroke:#ef6517!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-approved{left:66.666%!important;width:33.334%!important;justify-content:center!important;color:#169b5b!important;font-size:11px!important;font-weight:800!important;white-space:nowrap!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-viewed-marker{display:none!important}
  html body .v064-home.j515-unified-gallery .apg-card>.j517-card-hitarea{position:absolute!important;inset:0!important;z-index:8!important;display:block!important}
  html body .v064-home.j515-unified-gallery .apg-card>.apg-media{z-index:9!important}
  html body .v064-home.j515-unified-gallery .apg-card>.apg-body{z-index:9!important}
  html body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save{pointer-events:auto!important;z-index:20!important}

  /* Desktop-only generated UI must never appear in the locked mobile gallery. */
  html body .j579-unified-toolbar,
  html body .j579-filter-backdrop,
  html body .j503-sidebar,
  html body.j503-gallery-desktop .j503-sidebar{display:none!important}

  /* Gallery-only bottom reserve: the list now reaches the fixed mobile nav. */
  html body.public-body.automotive-mobile-shell-page.joblik-listing-gallery-page>main{
    margin-bottom:0!important;padding-bottom:0!important;min-height:0!important;
  }

  /* The two actions in the sort popup must remain on one unbroken row. */
  html body.public-body.joblik-listing-gallery-page .jam-quick-filter-panel .jam-quick-actions{
    display:grid!important;grid-template-columns:minmax(110px,.8fr) minmax(0,1.7fr)!important;
    grid-auto-flow:column!important;gap:8px!important;align-items:stretch!important;width:100%!important;min-width:0!important;
  }
  html body.public-body.joblik-listing-gallery-page .jam-quick-filter-panel .jam-quick-actions>a,
  html body.public-body.joblik-listing-gallery-page .jam-quick-filter-panel .jam-quick-actions>button{
    width:100%!important;min-width:0!important;margin:0!important;padding:0 8px!important;white-space:nowrap!important;word-break:keep-all!important;
  }
}

/* Server-verified cascade guard. This block owns only /gallery at <=900px.
   It intentionally cannot match the locked 0.33.605 desktop viewport. */
@media (max-width:900px){
  html body.public-body .v064-home.j515-unified-gallery .v064-featured .v064-cars-row.apg-grid.card-view-medium:not(.card-view-small):not(.card-view-large):not(.card-view-extra){
    display:block!important;
    grid-template-columns:none!important;
    grid-auto-rows:auto!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
    background:#fff!important;
    overflow:visible!important;
  }
  html body.public-body .v064-home.j515-unified-gallery .v064-featured .v064-cars-row.apg-grid.card-view-medium:not(.card-view-small):not(.card-view-large):not(.card-view-extra)>.apg-card{
    position:relative!important;
    display:grid!important;
    grid-template-columns:52% 48%!important;
    grid-template-rows:180px!important;
    width:100%!important;
    height:180px!important;
    min-height:180px!important;
    max-height:180px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-bottom:1px solid #efc5a6!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    background:#fff!important;
    direction:ltr!important;
  }
  html body.public-body .v064-home.j515-unified-gallery :is(.j503-topbar-secondary,.j579-unified-toolbar,.j579-filter-backdrop,.j503-sidebar){display:none!important}
  html body.public-body .v064-home.j515-unified-gallery .apg-card .apg-mobile-save{display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;z-index:40!important;cursor:pointer!important}
}
