/* Cần Thơ Ford v1.4.20 — Ngọc Design DNA / Mobile system */
.transit-mobile-color-control,.mustang-mobile-color-control{display:none}

@media(max-width:780px){
  /* Mobile navigation replaces the oversized bottom CTA bar. */
  .mobile-cta{display:none!important}
  .site-contact-fab{display:none!important}
  body{padding-bottom:0!important}

  .vehicle-mobile-nav{
    display:block!important;
    position:fixed!important;
    left:0!important;
    top:42%!important;
    transform:translateY(-50%)!important;
    z-index:92!important;
  }
  .vehicle-mobile-nav>summary{
    width:28px!important;
    height:62px!important;
    border:1px solid #dce5ee!important;
    border-left:0!important;
    border-radius:0 10px 10px 0!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:0 8px 22px rgba(0,27,63,.10)!important;
  }
  .vehicle-mobile-nav>summary span{
    font-size:9px!important;
    letter-spacing:.16em!important;
    color:#0068d7!important;
  }
  .vehicle-mobile-nav-panel{
    left:34px!important;
    top:-28px!important;
    width:254px!important;
    max-height:min(70vh,480px)!important;
    padding:10px!important;
    border:1px solid #dce5ee!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 18px 42px rgba(0,27,63,.16)!important;
    overflow:auto!important;
  }
  .vehicle-mobile-nav-links{display:grid;gap:2px}
  .vehicle-mobile-nav-links a,
  .vehicle-mobile-nav-panel>a{
    display:flex!important;
    align-items:center!important;
    min-height:39px!important;
    padding:9px 10px!important;
    border-radius:7px!important;
    color:#42566c!important;
    font-size:12px!important;
    line-height:1.25!important;
    font-weight:650!important;
  }
  .vehicle-mobile-nav-links a.is-active,
  .vehicle-mobile-nav-links a:hover{background:#edf5ff!important;color:#0068d7!important}
  .vehicle-mobile-nav-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
    margin-top:8px;
    padding-top:9px;
    border-top:1px solid #e3e9ef;
  }
  .mobile-nav-mini-action{
    min-height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    border:1px solid #dce5ee;
    border-radius:7px;
    background:#fff;
    color:#17304e;
    font-size:11px;
    font-weight:700;
  }
  .mobile-nav-mini-action span{font-size:14px;line-height:1}
  .mobile-nav-mini-action img{width:20px;height:20px;border-radius:5px;object-fit:cover}
  .mobile-nav-primary-action{
    grid-column:1/-1;
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 12px;
    border-radius:7px;
    background:#0068d7;
    color:#fff!important;
    font-size:12px;
    font-weight:750;
  }

  .site-back-to-top{
    right:14px!important;
    bottom:16px!important;
    width:42px!important;
    height:42px!important;
    border-radius:10px!important;
    box-shadow:0 8px 22px rgba(0,27,63,.12)!important;
  }

  /* One mobile image stage for all five vehicle pages. */
  .ranger-stage,
  .everest-stage-image,
  .territory-stage,
  .transit-color-stage,
  .mustang-color-stage{
    height:300px!important;
    min-height:300px!important;
    padding:10px 12px!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
    background:linear-gradient(180deg,#f7f9fb 0%,#eef3f7 100%)!important;
  }
  .ranger-stage .fsk-media-frame,
  .territory-stage .fsk-media-frame{
    width:100%!important;
    height:100%!important;
    aspect-ratio:auto!important;
  }
  .ranger-stage img,
  .everest-stage-image .everest-live-image,
  .territory-stage img,
  .transit-color-stage img,
  .mustang-color-stage img{
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;
    object-fit:contain!important;
    object-position:center!important;
    transform-origin:center!important;
  }
  /* Per-asset optical compensation: same perceived vehicle footprint. */
  .ranger-stage img{transform:scale(1.50)!important}
  .everest-stage-image .everest-live-image{transform:scale(1.16)!important}
  .territory-stage img{transform:scale(1.28)!important}
  .transit-color-stage img{transform:scale(1.18)!important}
  .mustang-color-stage img{transform:scale(1.38)!important}

  /* Color chooser directly under the vehicle image on every model. */
  .ranger-mobile-color-control,
  .everest-mobile-color-control,
  .territory-mobile-color-control,
  .transit-mobile-color-control,
  .mustang-mobile-color-control{
    display:block!important;
    padding:15px 18px 17px!important;
    border-top:1px solid #e0e6ed!important;
    border-bottom:1px solid #e0e6ed!important;
    background:#fff!important;
  }
  .ranger-color-head,
  .everest-color-head,
  .territory-color-head,
  .transit-color-head,
  .mustang-mobile-color-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:16px!important;
  }
  .ranger-color-head>span,
  .everest-color-head>span,
  .territory-color-head>span,
  .transit-color-head>span,
  .mustang-mobile-color-head>span{
    color:#7b8795!important;
    font-size:10.5px!important;
    line-height:1.2!important;
    font-weight:700!important;
    letter-spacing:.13em!important;
    text-transform:uppercase!important;
  }
  .ranger-color-head>strong,
  .everest-color-head>strong,
  .territory-color-head>strong,
  .transit-color-head>strong,
  .mustang-mobile-color-head>strong{
    color:#001b3f!important;
    font-size:15px!important;
    line-height:1.3!important;
    font-weight:750!important;
    text-align:right!important;
  }
  .ranger-color-swatches,
  .everest-color-swatches,
  .territory-color-swatches,
  .transit-color-swatches,
  .mustang-mobile-color-control .mustang-swatches{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:12px!important;
    margin:13px 0 0!important;
    padding:0!important;
  }
  .ranger-color-swatch,
  .everest-color-swatch,
  .territory-color-swatch,
  .transit-color-swatch,
  .mustang-swatch{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:50%!important;
    border:1px solid #c8d1da!important;
    box-shadow:none!important;
  }
  .ranger-color-swatch.active,
  .everest-color-swatch.active,
  .territory-color-swatch.active,
  .transit-color-swatch.active,
  .mustang-swatch.active{
    outline:2px solid #0068d7!important;
    outline-offset:3px!important;
  }

  /* Remove duplicate color controls from the information block on mobile. */
  .transit-variant-summary .transit-panel-colors{display:none!important}
  .mustang-color-info>.mustang-swatches,
  .mustang-color-info>div:nth-child(2){display:none!important}

  /* Consistent mobile title / price / action rhythm across vehicle selectors. */
  .ranger-variant-summary,
  .everest-variant-summary,
  .territory-variant-summary,
  .transit-variant-summary,
  .mustang-color-info{
    padding:20px 18px 18px!important;
  }
  .ranger-panel-title h3,
  .everest-panel-title h3,
  .territory-panel-title h3,
  .transit-variant-summary h3{
    margin:0 0 12px!important;
    color:#001b3f!important;
    font-size:30px!important;
    line-height:1.08!important;
    letter-spacing:-.025em!important;
    font-weight:750!important;
  }
  .ranger-panel-price,
  .everest-panel-price,
  .territory-panel-price{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:baseline!important;
    column-gap:14px!important;
    row-gap:7px!important;
    margin:0 0 13px!important;
    padding:0 0 14px!important;
    border-bottom:1px solid #e0e6ed!important;
  }
  .ranger-panel-price>span,
  .everest-panel-price>span,
  .territory-panel-price>span,
  .transit-panel-price>span{
    color:#7b8795!important;
    font-size:10px!important;
    line-height:1.25!important;
    font-weight:650!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
  }
  .ranger-panel-price strong,
  .everest-panel-price strong,
  .territory-panel-price strong,
  .transit-panel-price strong{
    color:#001b3f!important;
    font-size:27px!important;
    line-height:1.08!important;
    font-weight:750!important;
    letter-spacing:-.025em!important;
  }
  .ranger-panel-price strong,
  .everest-panel-price strong,
  .territory-panel-price strong{text-align:left!important}
  .vehicle-price-note{
    grid-column:1/-1!important;
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    color:#7d8996!important;
    font-size:11px!important;
    line-height:1.5!important;
    text-align:left!important;
  }
  .transit-panel-price{
    display:grid!important;
    gap:6px!important;
    margin:0 0 14px!important;
    padding:0 0 14px!important;
    border-bottom:1px solid #e0e6ed!important;
  }
  .transit-panel-price strong{font-size:27px!important;text-align:left!important}

  .ranger-config-row>span,
  .everest-config-row>span{
    color:#7b8795!important;
    font-size:10px!important;
    font-weight:650!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
  }
  .ranger-config-row select,
  .everest-config-row select{
    height:44px!important;
    border:1px solid #d6dee7!important;
    border-radius:5px!important;
    background:#fff!important;
    color:#26384c!important;
    font-size:12.5px!important;
  }

  .ranger-panel-actions,
  .everest-panel-actions,
  .territory-panel-actions,
  .transit-panel-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-top:0!important;
    padding-top:12px!important;
  }
  .ranger-panel-actions .btn,
  .everest-panel-actions .btn,
  .territory-panel-actions .btn,
  .transit-panel-actions .btn{
    min-height:44px!important;
    padding:0 10px!important;
    border-radius:4px!important;
    font-size:12.5px!important;
    white-space:nowrap!important;
  }

  /* Transit rows use the same restrained mobile typography. */
  .transit-spec-list{margin-top:2px!important}
  .transit-spec-list div{padding:11px 0!important;gap:14px!important}
  .transit-spec-list span{font-size:10px!important;letter-spacing:.11em!important}
  .transit-spec-list strong{font-size:12.5px!important;line-height:1.4!important;max-width:68%!important}

  /* Mustang: color now belongs to the image stage; info starts with version and facts. */
  .mustang-color-panel{display:flex!important;flex-direction:column!important;min-height:0!important}
  .mustang-color-stage{order:1}
  .mustang-mobile-color-control{order:2}
  .mustang-color-info{order:3!important}
  .mustang-color-info>div:first-child{
    padding:0 0 14px!important;
    margin-bottom:14px!important;
    border-bottom:1px solid #e0e6ed!important;
  }
  .mustang-color-info>div:first-child span{font-size:10px!important;letter-spacing:.12em!important}
  .mustang-color-info>div:first-child strong{font-size:14px!important}
  .mustang-color-facts{margin:0 0 18px!important;gap:0!important}
  .mustang-color-facts span{padding:11px 0!important;border-bottom:1px solid #e7ecf1!important}
  .mustang-color-facts b{font-size:17px!important}
  .mustang-color-info>.btn{min-height:44px!important;border-radius:4px!important;font-size:12.5px!important}

  /* Keep section horizontal rhythm compact and premium on phone. */
  .ranger-version-section,
  .everest-version-selector,
  .territory-version-section,
  .transit-version-section,
  .mustang-color-section{padding-top:44px!important;padding-bottom:34px!important}
}

@media(max-width:390px){
  .ranger-stage,
  .everest-stage-image,
  .territory-stage,
  .transit-color-stage,
  .mustang-color-stage{height:278px!important;min-height:278px!important}
  .ranger-panel-title h3,
  .everest-panel-title h3,
  .territory-panel-title h3,
  .transit-variant-summary h3{font-size:28px!important}
  .ranger-panel-price strong,
  .everest-panel-price strong,
  .territory-panel-price strong,
  .transit-panel-price strong{font-size:25px!important}
  .vehicle-mobile-nav-panel{width:240px!important}
}

/* v1.4.21 — mobile floating controls refinement */
@media(max-width:780px){
  /* Keep the quick menu as a compact control in the lower-left corner. */
  .vehicle-mobile-nav{
    left:0!important;
    right:auto!important;
    top:auto!important;
    bottom:16px!important;
    transform:none!important;
    z-index:95!important;
  }
  .vehicle-mobile-nav>summary{
    width:30px!important;
    height:68px!important;
    border-radius:0 12px 12px 0!important;
    box-shadow:0 8px 22px rgba(0,27,63,.12)!important;
  }
  .vehicle-mobile-nav-panel{
    left:36px!important;
    right:auto!important;
    top:auto!important;
    bottom:0!important;
    width:228px!important;
    max-height:min(62vh,420px)!important;
  }
  .vehicle-mobile-nav-actions{display:none!important}

  /* Restore compact Call + Zalo buttons as a persistent group in the lower-right corner. */
  .site-contact-fab{
    display:block!important;
    position:fixed!important;
    right:12px!important;
    bottom:16px!important;
    z-index:94!important;
  }
  .site-contact-fab>summary{display:none!important}
  .site-contact-fab-panel,
  .site-contact-fab:not([open]) .site-contact-fab-panel{
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
    position:static!important;
    right:auto!important;
    bottom:auto!important;
    width:auto!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .site-contact-action{
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0!important;
    border-radius:12px!important;
    background:#fff!important;
    border:1px solid #dce5ee!important;
    box-shadow:0 10px 24px rgba(0,27,63,.16)!important;
    grid-template-columns:none!important;
  }
  .site-contact-action>span:last-child{display:none!important}
  .site-contact-action-icon{
    width:36px!important;
    height:36px!important;
    border-radius:10px!important;
  }
  .site-contact-action--call .site-contact-action-icon{
    background:#0068d7!important;
    color:#fff!important;
  }
  .site-contact-action--zalo .site-contact-action-icon{
    background:#fff!important;
  }
  .site-contact-action--zalo .site-contact-action-icon img{
    width:24px!important;
    height:24px!important;
    border-radius:6px!important;
    object-fit:cover!important;
  }
  .site-back-to-top{
    right:14px!important;
    bottom:128px!important;
  }

  /* Refine heavy blue separators on mobile. */
  .ranger-story-rail article,
  .territory-story-rail article,
  .transit-feature-grid article,
  .mustang-feature-grid article,
  .mustang-tech-grid article,
  .feature-row article,
  .home-offer-item{
    border-top-width:1px!important;
  }
}

@media(max-width:640px){
  /* Remove the accidental empty space in Mustang's design editorial block. */
  .mustang-editorial-grid article.large{
    min-height:0!important;
    grid-template-rows:auto auto!important;
  }
}

/* v1.4.22 — restore compact Contact FAB with Call + Zalo inside */
@media(max-width:780px){
  .site-contact-fab{
    display:block!important;
    position:fixed!important;
    right:12px!important;
    bottom:16px!important;
    z-index:96!important;
  }
  .site-contact-fab>summary{
    display:grid!important;
    place-items:center!important;
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    padding:0!important;
    list-style:none!important;
    border:1px solid rgba(255,255,255,.9)!important;
    border-radius:12px!important;
    background:#0068d7!important;
    color:#fff!important;
    box-shadow:0 10px 24px rgba(0,55,120,.22)!important;
    cursor:pointer!important;
  }
  .site-contact-fab>summary::-webkit-details-marker{display:none!important}
  .site-contact-fab-icon{display:grid!important;place-items:center!important}
  .site-contact-fab-icon svg{width:21px!important;height:21px!important;fill:currentColor!important}

  .site-contact-fab-panel{
    position:absolute!important;
    right:0!important;
    bottom:58px!important;
    width:214px!important;
    padding:8px!important;
    border:1px solid #dce5ee!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.99)!important;
    box-shadow:0 16px 36px rgba(0,27,63,.18)!important;
  }
  .site-contact-fab:not([open]) .site-contact-fab-panel{display:none!important}
  .site-contact-fab[open] .site-contact-fab-panel{display:grid!important;gap:7px!important}

  .site-contact-action{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:50px!important;
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
    padding:6px 8px!important;
    border:0!important;
    border-radius:8px!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  .site-contact-action:hover{background:#f3f7fb!important}
  .site-contact-action>span:last-child{display:grid!important;gap:2px!important;min-width:0!important}
  .site-contact-action b{font-size:12px!important;line-height:1.2!important;color:#001b3f!important}
  .site-contact-action small{font-size:10px!important;line-height:1.25!important;color:#6d7a89!important}
  .site-contact-action-icon{
    width:36px!important;
    height:36px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:9px!important;
  }
  .site-contact-action--call .site-contact-action-icon{background:#0068d7!important;color:#fff!important}
  .site-contact-action--zalo .site-contact-action-icon{background:#fff!important;border:1px solid #dce5ee!important}
  .site-contact-action--zalo .site-contact-action-icon img{width:24px!important;height:24px!important;border-radius:5px!important;object-fit:cover!important}

  /* Back-to-top stays above the contact control, menu remains bottom-left. */
  .site-back-to-top{right:14px!important;bottom:76px!important}
}
