/* Phase 18.9.5.28.5.8.5.4 — Mobile Home Rails, Orders Tracking, Proof Form & AI Assistant Precision Hotfix
   UI/CSS only. Keeps cart, checkout, payments and orders logic untouched. */

/* 1) Home horizontal rails: no hidden first card on mobile and no desktop timer clipping. */
body.marketak-responsive-v18952858.view-home .exclusive-offers-pro-v62,
body.marketak-responsive-v18952858.view-home .home-commerce-row-v186,
body.marketak-responsive-v18952858.view-home .home-store-showcase-v186,
body.marketak-responsive-v18952858.view-home .featured-products-grid-v66,
body.marketak-responsive-v18952858.view-home .home-section-builder-item-v1862{
  overflow:visible!important;
  min-width:0!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-offers-marquee-v62,
body.marketak-responsive-v18952858.view-home .home-product-rail-v186,
body.marketak-responsive-v18952858.view-home .home-store-rail-v186{
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  scroll-snap-type:x proximity!important;
  scroll-padding-inline:18px!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-offers-track-v62{
  align-items:stretch!important;
  min-width:max-content!important;
  padding-block:8px 16px!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-offer-card-v62{
  width:330px!important;
  min-width:330px!important;
  max-width:330px!important;
  grid-template-columns:124px minmax(0,1fr)!important;
  align-items:stretch!important;
  overflow:hidden!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-offer-card-v62 .offer-info-v62{
  min-width:0!important;
  overflow:visible!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-timer-v62{
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  display:grid!important;
  grid-template-columns:auto minmax(120px,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  padding:7px 10px!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  border-radius:14px!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-timer-v62 span{
  white-space:nowrap!important;
  overflow:visible!important;
  font-size:11px!important;
  line-height:1.2!important;
}
body.marketak-responsive-v18952858.view-home .exclusive-timer-v62 b,
body.marketak-responsive-v18952858.view-home .exclusive-timer-v62.has-days-v1895285853 b{
  display:block!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  direction:ltr!important;
  unicode-bidi:plaintext!important;
  text-align:left!important;
  font-size:11.5px!important;
  line-height:1.2!important;
  letter-spacing:-.04em!important;
}
body.marketak-responsive-v18952858.view-home .home-product-rail-v186.recommended-v186,
body.marketak-responsive-v18952858.view-home .home-store-rail-v186{
  direction:rtl!important;
  padding-inline:18px!important;
}
body.marketak-responsive-v18952858.view-home .home-product-rail-v186.recommended-v186::before,
body.marketak-responsive-v18952858.view-home .home-store-rail-v186::before{
  content:""!important;
  flex:0 0 1px!important;
}
body.marketak-responsive-v18952858.view-home .home-product-rail-v186.recommended-v186::after,
body.marketak-responsive-v18952858.view-home .home-store-rail-v186::after{
  content:""!important;
  flex:0 0 1px!important;
}
body.marketak-responsive-v18952858.view-home .home-store-card-v186{
  flex:0 0 245px!important;
  width:245px!important;
  min-width:245px!important;
  max-width:245px!important;
  scroll-snap-align:start!important;
}
@media(max-width:680px){
  body.marketak-responsive-v18952858.view-home .home-wide-container-v1861{
    width:100%!important;
    max-width:100%!important;
    padding-inline:16px!important;
    box-sizing:border-box!important;
  }
  body.marketak-responsive-v18952858.view-home .exclusive-offers-marquee-v62,
  body.marketak-responsive-v18952858.view-home .home-product-rail-v186,
  body.marketak-responsive-v18952858.view-home .home-store-rail-v186{
    margin-inline:0!important;
    width:100%!important;
    border-radius:0!important;
    padding-inline:14px!important;
    scroll-padding-inline:14px!important;
  }
  body.marketak-responsive-v18952858.view-home .exclusive-offer-card-v62{
    width:292px!important;
    min-width:292px!important;
    max-width:292px!important;
    grid-template-columns:108px minmax(0,1fr)!important;
  }
  body.marketak-responsive-v18952858.view-home .exclusive-timer-v62{
    grid-template-columns:1fr!important;
    gap:3px!important;
    min-height:44px!important;
    padding:6px 8px!important;
  }
  body.marketak-responsive-v18952858.view-home .exclusive-timer-v62 span,
  body.marketak-responsive-v18952858.view-home .exclusive-timer-v62 b,
  body.marketak-responsive-v18952858.view-home .exclusive-timer-v62.has-days-v1895285853 b{
    text-align:center!important;
    font-size:10.8px!important;
  }
  body.marketak-responsive-v18952858.view-home .home-store-card-v186{
    flex-basis:205px!important;
    width:205px!important;
    min-width:205px!important;
    max-width:205px!important;
  }
  body.marketak-responsive-v18952858.view-home .home-product-tile-v186{
    flex-basis:194px!important;
    width:194px!important;
    min-width:194px!important;
    max-width:194px!important;
  }
}

/* 2) Customer order tracking: details become readable cards on mobile instead of narrow columns. */
.customer-orders-v177,
.customer-orders-v177 *{box-sizing:border-box;}
.customer-orders-v177{overflow-x:hidden!important;}
.customer-orders-v177 .order-card,
.customer-orders-v177 .tracking-panel,
.customer-orders-v177 .proof-panel{
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
.customer-orders-v177 .tracking-details[open]{
  overflow:hidden!important;
}
.customer-orders-v177 .stage-info-list{
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;
  gap:10px!important;
}
.customer-orders-v177 .stage-info-item{
  min-width:0!important;
  text-align:right!important;
  overflow:hidden!important;
}
.customer-orders-v177 .stage-info-item b,
.customer-orders-v177 .stage-info-item small{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.75!important;
}
@media(max-width:760px){
  .customer-orders-v177 .tracking-panel{
    padding:14px!important;
    border-radius:22px!important;
  }
  .customer-orders-v177 .tracking-details summary{
    width:100%!important;
    justify-content:center!important;
    min-height:48px!important;
    border-radius:16px!important;
  }
  .customer-orders-v177 .stage-info-list{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    margin-top:12px!important;
  }
  .customer-orders-v177 .stage-info-item{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:4px!important;
    padding:12px 13px!important;
    border-radius:16px!important;
    background:#fff!important;
  }
  .customer-orders-v177 .stage-info-item b{
    font-size:14px!important;
  }
  .customer-orders-v177 .stage-info-item small{
    font-size:12px!important;
  }
  .customer-orders-v177 .timeline{
    gap:10px!important;
    padding-inline:2px!important;
  }
  .customer-orders-v177 .t-step{
    min-width:132px!important;
  }
}

/* 3) Payment proof form: inputs/files/textareas stay inside the mobile card. */
.customer-orders-v177 .proof-form{
  width:100%!important;
  min-width:0!important;
}
.customer-orders-v177 .proof-form label,
.customer-orders-v177 .proof-form .full{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.customer-orders-v177 input,
.customer-orders-v177 select,
.customer-orders-v177 textarea,
.customer-orders-v177 input[type="file"]{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow-wrap:anywhere!important;
}
.customer-orders-v177 input[type="file"]{
  min-height:50px!important;
  padding:9px!important;
  font-size:13px!important;
  line-height:1.4!important;
  background:#fff!important;
}
.customer-orders-v177 textarea{
  resize:vertical!important;
  min-height:96px!important;
}
.customer-orders-v177 .btn.ok,
.customer-orders-v177 .proof-form .btn{
  width:100%!important;
  min-height:52px!important;
  white-space:normal!important;
  text-align:center!important;
}
@media(max-width:760px){
  .customer-orders-v177 .proof-panel{
    padding:14px!important;
    border-radius:22px!important;
  }
  .customer-orders-v177 .proof-form{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:11px!important;
  }
  .customer-orders-v177 .proof-form label span{
    font-size:13px!important;
    line-height:1.6!important;
  }
  .customer-orders-v177 .notice.warn,
  .customer-orders-v177 .notice.ok,
  .customer-orders-v177 .notice.bad{
    font-size:13px!important;
    line-height:1.8!important;
    border-radius:18px!important;
  }
}

/* 4) AI assistant: compact FAB, panel inside viewport, never covering full content column. */
#marketak-ai-widget.marketak-ai-widget{
  z-index:2147483000!important;
  max-width:calc(100vw - 24px)!important;
}
#marketak-ai-toggle.marketak-ai-fab{
  min-width:0!important;
  max-width:176px!important;
  height:58px!important;
  padding:10px 14px!important;
  border-radius:22px!important;
  overflow:hidden!important;
}
#marketak-ai-toggle.marketak-ai-fab small{
  max-width:92px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#marketak-ai-panel.marketak-ai-panel{
  width:min(390px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
  height:min(620px,calc(100vh - 120px))!important;
  max-height:calc(100vh - 120px)!important;
  overflow:hidden!important;
}
#marketak-ai-panel .marketak-ai-body{
  overflow:auto!important;
}
#marketak-ai-panel .marketak-ai-msg{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}
#marketak-ai-panel .marketak-ai-form input{
  min-width:0!important;
}
@media(max-width:640px){
  #marketak-ai-widget.marketak-ai-widget{
    left:14px!important;
    right:auto!important;
    bottom:18px!important;
  }
  #marketak-ai-widget.is-open.marketak-ai-widget{
    left:10px!important;
    right:10px!important;
    bottom:10px!important;
    max-width:none!important;
  }
  #marketak-ai-toggle.marketak-ai-fab{
    width:62px!important;
    height:62px!important;
    padding:0!important;
    border-radius:50%!important;
    display:grid!important;
    place-items:center!important;
  }
  #marketak-ai-toggle.marketak-ai-fab b{
    width:42px!important;
    height:42px!important;
  }
  #marketak-ai-toggle.marketak-ai-fab small{
    display:none!important;
  }
  #marketak-ai-panel.marketak-ai-panel{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:84px!important;
    width:auto!important;
    max-width:none!important;
    height:min(560px,calc(100vh - 112px))!important;
    max-height:calc(100vh - 112px)!important;
    border-radius:24px!important;
  }
  #marketak-ai-panel .marketak-ai-head{
    padding:14px!important;
  }
  #marketak-ai-panel .marketak-ai-body{
    padding:14px!important;
  }
  #marketak-ai-panel .marketak-ai-form{
    padding:10px!important;
  }
}

/* 5) Footer paragraph final readability guard. */
.footer-v14 .footer-brand-v14 p{
  display:block!important;
  max-width:820px!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  line-height:2.05!important;
}
@media(max-width:680px){
  .footer-v14 .footer-brand-v14 p{
    text-align:center!important;
    font-size:13px!important;
    line-height:1.95!important;
    padding-inline:4px!important;
  }
}
