/* Sprint 653 — In-house arrivals compact + fully responsive
   Exact component: .tf-inhouse-arrivals-v2
   No markup/business-logic changes. */

body:has(.tf-home-v3) .tf-inhouse-arrivals-v2{
  overflow:hidden!important;
}

/* ============================================================
   DESKTOP
   ============================================================ */
@media(min-width:1181px){
  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2{
    padding:24px 0!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2>.shell{
    width:min(1520px,calc(100% - 40px))!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head{
    display:flex!important;
    align-items:flex-end!important;
    justify-content:space-between!important;
    gap:18px!important;
    margin-bottom:12px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head .eyebrow{
    margin-bottom:5px!important;
    font-size:8px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head h2{
    margin:0 0 4px!important;
    font-size:27px!important;
    line-height:1.05!important;
    letter-spacing:-.035em!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head .section-copy{
    margin:0!important;
    font-size:9px!important;
    line-height:1.4!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-viewall{
    flex:0 0 auto!important;
    min-height:36px!important;
    padding:0 13px!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:8px!important;
    border:1px solid #d5e1ed!important;
    border-radius:9px!important;
    background:#fff!important;
    color:#1768cf!important;
    font-size:9px!important;
    font-weight:900!important;
    text-decoration:none!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-viewall span{
    display:grid!important;
    place-items:center!important;
    width:24px!important;
    height:24px!important;
    border-radius:7px!important;
    background:#eef5ff!important;
  }

  /* 6 compact cards on large desktop */
  body:has(.tf-home-v3) .tf-inhouse-arrivals-grid-v2{
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:9px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-card-v2{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border:1px solid #dce5ef!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:0 5px 15px rgba(12,39,72,.035)!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-media{
    height:148px!important;
    min-height:148px!important;
    max-height:148px!important;
    padding:7px!important;
    background:#f5f7fa!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-media img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    background:#f5f7fa!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-badge{
    left:8px!important;
    top:8px!important;
    min-height:21px!important;
    padding:0 7px!important;
    font-size:6.5px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body{
    flex:1 1 auto!important;
    min-height:142px!important;
    height:auto!important;
    padding:9px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-commerce-meta{
    min-height:18px!important;
    margin-bottom:5px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:5px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-commerce-meta span,
  body:has(.tf-home-v3) .tf-inhouse-commerce-meta b{
    font-size:6px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body h3{
    min-height:31px!important;
    max-height:31px!important;
    margin:0 0 7px!important;
    font-size:10px!important;
    line-height:1.3!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body h3 a{
    -webkit-line-clamp:2!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price{
    margin-top:6px!important;
    margin-bottom:8px!important;
    font-size:14px!important;
    line-height:1!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price strong{
    font-size:14px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price small{
    font-size:7px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-add-cart{
    width:100%!important;
    min-height:34px!important;
    height:34px!important;
    margin-top:auto!important;
    padding:0 9px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    border:1px solid #efa900!important;
    border-radius:8px!important;
    background:#ffc23a!important;
    color:#0b2b52!important;
    font-size:8px!important;
    font-weight:900!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-add-cart svg{
    width:15px!important;
    height:15px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
  }
}

/* 5 cards on common laptop/desktop widths */
@media(min-width:901px) and (max-width:1380px){
  body:has(.tf-home-v3) .tf-inhouse-arrivals-grid-v2{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}

/* ============================================================
   TABLET
   ============================================================ */
@media(min-width:521px) and (max-width:900px){
  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2{
    padding:18px 0!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2>.shell{
    width:calc(100% - 24px)!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head{
    align-items:flex-end!important;
    gap:10px!important;
    margin-bottom:10px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head h2{
    font-size:22px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-viewall{
    min-height:34px!important;
    padding:0 10px!important;
    font-size:8px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-grid-v2{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-card-v2{
    width:auto!important;
    max-width:none!important;
    min-height:0!important;
    flex:none!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-media{
    height:155px!important;
    min-height:155px!important;
    max-height:155px!important;
    padding:7px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body{
    min-height:140px!important;
    padding:9px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body h3{
    min-height:31px!important;
    margin-bottom:7px!important;
    font-size:10px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price{
    margin-top:5px!important;
    margin-bottom:8px!important;
    font-size:14px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-add-cart{
    min-height:34px!important;
    height:34px!important;
    border-radius:8px!important;
    font-size:8px!important;
  }
}

/* ============================================================
   MOBILE <= 520px
   One compact card per row. This removes the squeezed two-card issue
   visible in the supplied screenshot.
   ============================================================ */
@media(max-width:520px){
  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2{
    padding:14px 0!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2>.shell{
    width:calc(100% - 14px)!important;
    margin-inline:auto!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:end!important;
    gap:8px!important;
    margin-bottom:9px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head>div{
    min-width:0!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head .eyebrow{
    margin-bottom:4px!important;
    font-size:7px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head h2{
    margin:0 0 3px!important;
    font-size:20px!important;
    line-height:1.08!important;
    letter-spacing:-.025em!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head .section-copy{
    max-width:290px!important;
    margin:0!important;
    font-size:8px!important;
    line-height:1.35!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-viewall{
    min-width:64px!important;
    min-height:32px!important;
    padding:0 8px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border:1px solid #d5e1ed!important;
    border-radius:8px!important;
    background:#fff!important;
    color:#1768cf!important;
    font-size:7px!important;
    font-weight:900!important;
    text-decoration:none!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-viewall span{
    font-size:11px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-grid-v2{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-card-v2{
    display:grid!important;
    grid-template-columns:112px minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:148px!important;
    height:auto!important;
    overflow:hidden!important;
    border:1px solid #dce5ef!important;
    border-radius:11px!important;
    background:#fff!important;
    box-shadow:0 5px 15px rgba(12,39,72,.035)!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-media{
    width:112px!important;
    min-width:112px!important;
    max-width:112px!important;
    height:100%!important;
    min-height:148px!important;
    max-height:none!important;
    padding:6px!important;
    border-right:1px solid #e4eaf1!important;
    background:#f5f7fa!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-media img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    background:#f5f7fa!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-badge{
    left:6px!important;
    top:6px!important;
    min-height:20px!important;
    padding:0 6px!important;
    font-size:6px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body{
    min-width:0!important;
    min-height:148px!important;
    height:auto!important;
    padding:9px!important;
    display:flex!important;
    flex-direction:column!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-commerce-meta{
    min-height:15px!important;
    margin-bottom:5px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:4px!important;
    overflow:hidden!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-commerce-meta span{
    max-width:120px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    font-size:5.7px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-commerce-meta b{
    display:none!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-body h3{
    min-height:32px!important;
    max-height:32px!important;
    margin:0 0 6px!important;
    font-size:10px!important;
    line-height:1.3!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price{
    margin-top:auto!important;
    margin-bottom:7px!important;
    font-size:14px!important;
    line-height:1!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price strong{
    font-size:14px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-price small{
    font-size:6.5px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-add-cart{
    width:100%!important;
    min-height:32px!important;
    height:32px!important;
    margin:0!important;
    padding:0 8px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border:1px solid #efa900!important;
    border-radius:7px!important;
    background:#ffc23a!important;
    color:#0b2b52!important;
    font-size:7px!important;
    font-weight:900!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-add-cart svg{
    width:14px!important;
    height:14px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
  }

  /* Give floating AI room without covering the CTA of the final visible card. */
  body:has(.tf-home-v3) .tf-inhouse-arrivals-v2{
    padding-bottom:72px!important;
  }
}

/* Very small devices */
@media(max-width:360px){
  body:has(.tf-home-v3) .tf-inhouse-arrival-card-v2{
    grid-template-columns:98px minmax(0,1fr)!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrival-media{
    width:98px!important;
    min-width:98px!important;
    max-width:98px!important;
  }

  body:has(.tf-home-v3) .tf-inhouse-arrivals-head h2{
    font-size:18px!important;
  }
}
