/* ==========================================================
 * KBM 1.9.9-rc.19 — Bama-pattern mobile card convergence
 * Clean-room adaptation: only layout patterns are adapted.
 * Scope: rental archive and mobile home hero density.
 * ========================================================== */

.kbm-ads-recode-section{display:flex;flex-direction:column;gap:12px;min-width:0}
.kbm-ads-recode-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:2px 2px 0}
.kbm-ads-recode-section-head>div{min-width:0}
.kbm-ads-recode-section-head span{display:block;color:#9a6b00;font-size:11px;font-weight:900;line-height:1.5}
.kbm-ads-recode-section-head h2{margin:2px 0 0;color:#0b1b2b;font-size:20px;font-weight:950;line-height:1.5}
.kbm-ads-recode-section-head p{margin:2px 0 0;color:#64748b;font-size:12px;font-weight:700;line-height:1.7}
.kbm-ads-recode-section-head>a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 12px;border:1px solid #dce3ea;border-radius:11px;background:#fff;color:#0b1b2b;font-size:12px;font-weight:900;white-space:nowrap}
.kbm-ads-recode-section--featured{padding:14px;border:1px solid rgba(245,183,0,.45);border-radius:20px;background:linear-gradient(135deg,#fff9dc 0%,#fff 56%,#f7fafc 100%);box-shadow:0 12px 32px rgba(11,42,59,.08)}
.kbm-ads-recode-section--featured .kbm-ads-recode-section-head{padding-bottom:2px;border-bottom:1px solid rgba(245,183,0,.28)}
.kbm-ads-recode-section--latest{gap:10px}
.kbm-ads-recode-section-head--latest{align-items:center;border-bottom:1px solid #e5e9ef;padding-bottom:8px}

/* Category and save control are content metadata, never image overlays. */
.kbm-ads-recode-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.kbm-ads-recode-card-category{display:block;min-width:0;max-width:calc(100% - 42px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid #dfe6ed;border-radius:999px;background:#f8fafc;color:#405267;padding:4px 9px;font-size:10.5px;font-weight:850;line-height:1.4}
.kbm-ads-recode-card-head .kbm-final26-favorite{position:static!important;inset:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;margin:0!important;padding:0!important;border:1px solid #dfe6ed!important;border-radius:999px!important;background:#fff!important;color:#405267!important;box-shadow:none!important;font:inherit!important;line-height:1!important;overflow:hidden!important}
.kbm-ads-recode-card-head .kbm-final26-favorite.is-active{background:#fff6c7!important;border-color:#f0c94d!important;color:#7a5600!important}
.kbm-ads-recode-card-head .kbm-final26-favorite>span{font-size:19px;line-height:1}
.kbm-ads-recode-card-head .kbm-final26-favorite>b{font-size:9px!important;font-weight:900!important;line-height:1!important}

/* The image only carries compact, non-obstructive source/media markers. */
.kbm-ads-recode-card-badges{inset:8px auto auto 8px!important;align-items:flex-start!important;max-width:calc(100% - 16px)!important}
.kbm-ads-recode-badge{display:inline-flex;align-items:center;justify-content:center;min-height:24px;max-width:100%;padding:3px 8px;font-size:9.5px;line-height:1.3}
.kbm-ads-recode-badge--featured{width:28px!important;min-width:28px!important;height:28px!important;padding:0!important;border-radius:9px!important;background:linear-gradient(145deg,#ffdb3d,#f3b700)!important;color:#0b1b2b!important;font-size:15px!important;box-shadow:0 7px 18px rgba(86,62,0,.24)!important}
.kbm-ads-recode-badge--divar{background:rgba(255,255,255,.94)!important;color:#334155!important}
.kbm-ads-recode-badge--video{width:26px;min-width:26px;padding:0;background:rgba(11,27,43,.88)!important;color:#fff!important}
.kbm-ads-recode-badge--cat{display:none!important}

/* Premium cards are differentiated by the section, border and visual accent—not oversized text. */
.kbm-ads-recode-grid .kbm-ads-recode-card.is-featured:not(.is-expired)::after{content:none!important;display:none!important}
.kbm-ads-recode-grid .kbm-ads-recode-card.is-featured:not(.is-expired)::before{height:4px!important;background:linear-gradient(90deg,#0b2a3b 0%,#ffcf19 52%,#0b2a3b 100%)!important}
.kbm-ads-recode-grid .kbm-ads-recode-card.is-featured:not(.is-expired){border-color:rgba(231,174,0,.72)!important;box-shadow:0 13px 34px rgba(11,42,59,.13),0 0 0 2px rgba(255,204,0,.09)!important}

.kbm-ads-recode-card-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;min-height:47px}
.kbm-ads-recode-card-price{display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:center;gap:1px!important;min-width:0;max-width:100%;line-height:1.35}
.kbm-ads-recode-card-price strong{display:block;max-width:100%;color:#0b1b2b;font-size:12.5px;font-weight:950;white-space:normal;overflow-wrap:anywhere}
.kbm-ads-recode-card-price small{display:block!important;color:#64748b!important;font-size:10px!important;font-weight:800!important;white-space:normal!important}

@media(max-width:760px){
  /* Remove redundant specialist kickers from the compact mobile viewport. */
  body :where(.kbm-ahc-home__kicker,.kbm-ads-recode-kicker){display:none!important}
  .kbm-ads-recode{padding-inline:10px!important;gap:12px!important}
  .kbm-ads-recode-hero{padding:16px!important;border-radius:17px!important;grid-template-columns:1fr!important;gap:10px!important}
  .kbm-ads-recode-hero h1{margin:0 0 4px!important;font-size:20px!important;line-height:1.55!important}
  .kbm-ads-recode-hero p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px!important;line-height:1.75!important}
  .kbm-ads-recode-hero-cta{grid-template-columns:1fr 1fr!important;min-width:0!important}
  .kbm-ads-recode-hero-btn{min-height:40px!important}
  .kbm-ads-recode-trust{font-size:11.5px!important;padding:9px 11px!important}
  .kbm-ads-recode-section--featured{padding:11px 9px 12px!important;border-radius:18px!important;margin-inline:-1px!important}
  .kbm-ads-recode-section-head{align-items:center!important;padding-inline:2px!important}
  .kbm-ads-recode-section-head h2{font-size:17px!important}
  .kbm-ads-recode-section-head p{display:none!important}
  .kbm-ads-recode-section-head>a{min-height:32px!important;padding:5px 9px!important;font-size:10.5px!important}
  .kbm-ads-recode-featured-grid{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:min(88vw,390px)!important;grid-template-columns:none!important;gap:10px!important;overflow-x:auto!important;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;padding:2px 1px 8px!important;scrollbar-width:none}
  .kbm-ads-recode-featured-grid::-webkit-scrollbar{display:none}
  .kbm-ads-recode-featured-grid .kbm-ads-recode-card{scroll-snap-align:start}

  .kbm-ads-recode-grid{grid-template-columns:1fr!important;gap:10px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card{
    direction:rtl!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 142px!important;
    grid-template-rows:1fr!important;
    width:100%!important;
    min-height:178px!important;
    max-height:none!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 8px 22px rgba(11,42,59,.075)!important;
    overflow:hidden!important;
  }
  .kbm-ads-recode-grid .kbm-ads-recode-card-media{
    grid-column:2!important;
    grid-row:1!important;
    width:142px!important;
    min-width:142px!important;
    height:100%!important;
    min-height:178px!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    border-inline-start:1px solid #e5e9ef!important;
    border-inline-end:0!important;
  }
  .kbm-ads-recode-grid .kbm-ads-recode-card-media img{object-position:center!important;transform:none!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-body{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    min-height:178px!important;
    padding:10px 11px!important;
    gap:6px!important;
  }
  .kbm-ads-recode-card-head{min-height:30px}
  .kbm-ads-recode-card-category{font-size:9.5px!important;padding:3px 7px!important;max-width:calc(100% - 38px)!important}
  .kbm-ads-recode-card-head .kbm-final26-favorite{flex-basis:31px!important;width:31px!important;min-width:31px!important;max-width:31px!important;height:31px!important;min-height:31px!important;max-height:31px!important}
  .kbm-ads-recode-card-head .kbm-final26-favorite>span{font-size:17px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-title{margin:0!important;min-height:42px!important;font-size:13.5px!important;line-height:1.55!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-meta{display:flex!important;flex-wrap:wrap!important;gap:4px!important;max-height:51px!important;overflow:hidden!important}
  .kbm-ads-recode-grid .kbm-ads-recode-chip{padding:2px 6px!important;font-size:9.5px!important;line-height:1.45!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-meta .kbm-ads-recode-chip:nth-child(n+3){display:none!important}
  .kbm-ads-recode-grid .kbm-p18tech-card-summary,
  .kbm-ads-recode-grid .kbm-p3-rating-badge--card-live{display:none!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-foot{margin-top:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;gap:6px!important;padding-top:5px!important;border-top:1px solid #edf1f4}
  .kbm-ads-recode-grid .kbm-ads-recode-card-price{min-width:0!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-price strong{font-size:11.5px!important;line-height:1.35!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-price small{font-size:9.5px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-cta{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:68px!important;min-height:34px!important;padding:6px 9px!important;border-radius:9px!important;font-size:10.5px!important;box-shadow:none!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card.is-featured:not(.is-expired) .kbm-ads-recode-card-cta::before{display:none!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card.is-expired::before{inset:0!important;right:auto!important;width:3px!important}
}

@media(max-width:390px){
  .kbm-ads-recode-grid .kbm-ads-recode-card{grid-template-columns:minmax(0,1fr) 128px!important;min-height:172px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-media{width:128px!important;min-width:128px!important;min-height:172px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-body{min-height:172px!important;padding:9px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-foot{grid-template-columns:minmax(0,1fr) 64px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-cta{min-width:64px!important;padding-inline:6px!important}
}

@media(max-width:350px){
  .kbm-ads-recode-grid .kbm-ads-recode-card{grid-template-columns:minmax(0,1fr) 116px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-media{width:116px!important;min-width:116px!important}
  .kbm-ads-recode-grid .kbm-ads-recode-card-price strong{font-size:10.5px!important}
}
