/* SONI FINCORP MOBILE UI HOTFIX V1
   Mobile-only overrides. Desktop layout remains unchanged. */

@media (max-width: 768px) {
  html{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    -webkit-text-size-adjust:100%;
  }
  body{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }
  img,svg,video,canvas{max-width:100%}

  /* Shared shell */
  .wrap,
  .sfpl3-wrap{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .nav-shell{padding:10px 0!important}
  .navbar{
    width:100%!important;
    min-height:64px!important;
    padding:8px 10px!important;
    border-radius:18px!important;
    gap:8px!important;
  }
  .brand{min-width:0!important;max-width:calc(100% - 62px)!important}
  .brand img{
    width:132px!important;
    max-width:48vw!important;
    height:auto!important;
  }
  .nav-actions{margin-left:auto!important;gap:6px!important;flex:0 0 auto!important}
  .icon-btn{
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    padding:0!important;
    border-radius:15px!important;
  }

  /* HOME HERO */
  .hero{
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    padding:28px 0 26px!important;
    overflow:hidden!important;
  }
  .hero-bg{
    width:100%!important;
    max-width:100%!important;
    inset:0!important;
  }
  .hero-inner{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    grid-template-columns:1fr!important;
    gap:22px!important;
    align-items:start!important;
  }
  .hero-copy-v2{padding-top:0!important;min-width:0!important}
  .hero .eyebrow{
    max-width:100%!important;
    font-size:11px!important;
    line-height:1.3!important;
    white-space:normal!important;
  }
  .hero h1{
    max-width:none!important;
    margin:14px 0 14px!important;
    font-size:clamp(34px,10.2vw,42px)!important;
    line-height:1.04!important;
    letter-spacing:-1.5px!important;
  }
  .hero-sub{
    max-width:none!important;
    font-size:16px!important;
    line-height:1.55!important;
  }
  .trust-chips{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    width:100%!important;
  }
  .trust-chip{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
  .hero-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    width:100%!important;
  }
  .sf-home-primary,
  .sf-home-secondary{
    width:100%!important;
    max-width:none!important;
    min-height:48px!important;
    justify-content:center!important;
  }
  .hero .enquiry{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    justify-self:stretch!important;
    margin:0!important;
  }
  .hero .enquiry *,
  #eligibilityCheck *{box-sizing:border-box}
  #eligibilityCheck{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* HOME: LOANS & CARDS — no sideways clipping */
  .sf-loans-cards{padding:34px 0!important;overflow:hidden!important}
  .sf-lc-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  .sf-lc-card{
    width:100%!important;
    min-width:0!important;
    min-height:126px!important;
    padding:16px 8px 13px!important;
    border-radius:16px!important;
  }
  .sf-lc-icon{
    width:56px!important;
    height:56px!important;
    border-radius:15px!important;
    margin-bottom:9px!important;
  }
  .sf-lc-icon svg{width:29px!important;height:29px!important}
  .sf-lc-card strong{
    font-size:13.5px!important;
    line-height:1.3!important;
    text-align:center!important;
    overflow-wrap:anywhere!important;
  }
  .sf-lc-badge{
    font-size:9px!important;
    max-width:calc(100% - 14px)!important;
    white-space:nowrap!important;
  }

  /* HOME: ADVANCED EMI — desktop 3 columns must stack on phone */
  .sf-home-emi{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  .sf-home-emi .emi-shell{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    width:100%!important;
    max-width:100%!important;
    align-items:stretch!important;
  }
  .sf-home-emi .emi-shell > *{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    position:static!important;
  }
  .sf-home-emi .calc-grid{
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100%!important;
  }
  .sf-home-emi .calc,
  .sf-home-emi .emi-result,
  .sf-home-emi .emi-intro,
  .sf-home-emi .calculator-copy{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .sf-home-emi .emi-result{
    position:static!important;
    top:auto!important;
    border-radius:18px!important;
  }
  .sf-home-emi input,
  .sf-home-emi select,
  .sf-home-emi button{
    max-width:100%!important;
  }
  .sf-home-emi .sf-emi-schedule{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
  }

  /* PERSONAL LOAN */
  .sfpl3-main{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  .sfpl3-hero{padding:18px 0 22px!important}
  .sfpl3-hero-grid{
    grid-template-columns:1fr!important;
    gap:18px!important;
    width:100%!important;
  }
  .sfpl3-hero-copy{padding:4px 0 0!important}
  .sfpl3-crumb{margin-bottom:12px!important}
  .sfpl3-hero h1{
    font-size:clamp(32px,9vw,38px)!important;
    line-height:1.07!important;
    letter-spacing:-1px!important;
  }
  .sfpl3-hero-lead{
    max-width:none!important;
    font-size:15px!important;
    line-height:1.6!important;
  }
  .sfpl3-benefit-list{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .sfpl3-hero-note{
    width:100%!important;
    max-width:100%!important;
    align-items:flex-start!important;
  }
  .sfpl3-form-slot{
    position:static!important;
    top:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .sfpl3-form-slot > *{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  .sfpl3-facts{
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }
  .sfpl3-fact{
    min-width:0!important;
    padding:14px 12px!important;
  }

  /* Lender comparison stays readable with new Processing Time/Fees */
  .sfpl3-lender{
    grid-template-columns:1fr 1fr!important;
    gap:12px!important;
    padding:14px!important;
  }
  .sfpl3-bank{grid-column:1/-1!important;min-width:0!important}
  .sfpl3-lender .sfpl3-metric{
    display:block!important;
    min-width:0!important;
  }
  .sfpl3-lender .sfpl3-btn{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
  }
  .sfpl3-bank b{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }

  /* New PL eligibility calculator */
  .sfpl4-calc-shell{
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100%!important;
  }
  .sfpl4-input-panel,
  .sfpl4-result-panel{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:17px!important;
  }
  .sfpl4-result-panel{
    border-left:0!important;
    border-top:1px solid #dbe7f4!important;
  }
  .sfpl4-input-grid{
    grid-template-columns:1fr!important;
    gap:16px!important;
  }
  .sfpl4-result-main{
    grid-template-columns:1fr!important;
    gap:16px!important;
    text-align:center!important;
  }
  .sfpl4-ring{
    width:142px!important;
    height:142px!important;
    margin:0 auto!important;
  }
  .sfpl4-eligible-copy strong{
    font-size:30px!important;
    overflow-wrap:anywhere!important;
  }
  .sfpl4-control-top{
    align-items:flex-start!important;
  }
  .sfpl4-tenure-top{
    flex-direction:column!important;
  }
  .sfpl4-tenure-actions{
    width:100%!important;
    justify-content:space-between!important;
  }

  .sfpl3-card-grid,
  .sfpl3-two,
  .sfpl3-faq{
    grid-template-columns:1fr!important;
  }
  .sfpl3-type-grid,
  .sfpl3-score{
    grid-template-columns:1fr 1fr!important;
  }
  .sfpl3-table-wrap{
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  .sfpl3-final{
    flex-direction:column!important;
    align-items:flex-start!important;
  }
  .sfpl3-final .sfpl3-btn{width:100%!important}
}

@media (max-width: 390px) {
  .wrap,.sfpl3-wrap{width:calc(100% - 18px)!important}
  .hero-inner{width:calc(100% - 18px)!important}
  .hero h1{font-size:33px!important}
  .sf-lc-grid{gap:9px!important}
  .sf-lc-card{min-height:120px!important;padding-left:6px!important;padding-right:6px!important}
  .sfpl3-type-grid,.sfpl3-score{grid-template-columns:1fr!important}
}
