/* NovaCommerce 473: shared, collision-free footer navigation and purchase rail. */
@media (max-width:1180px) {
  body.nc-mobile-ui-399 {
    --t473-dock-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    --t473-dock-height: 76px;
    --t473-dock-gap: 10px;
    --t473-purchase-height: 82px;
    --t473-content-bottom: calc(var(--t473-dock-bottom) + var(--t473-dock-height) + 22px);
  }
  /* Remove stale legacy mobile navigation when the new dock is enabled. */
  body.nc-mobile-ui-399:has(.t472-mobile-dock) .t399-mobile-dock,
  body.nc-mobile-ui-399:has(.t472-mobile-dock) .nc-mobile-bottom {
    display:none!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock {
    display:grid!important;
    position:fixed!important;
    z-index:10030!important;
    left:max(8px,env(safe-area-inset-left,0px))!important;
    right:max(8px,env(safe-area-inset-right,0px))!important;
    bottom:var(--t473-dock-bottom)!important;
    height:var(--t473-dock-height)!important;
    min-height:0!important;
    width:auto!important;
    padding:7px!important;
    margin:0!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:3px!important;
    align-items:stretch!important;
    background:#fff!important;
    border:1px solid #e2e8f0!important;
    border-radius:19px!important;
    box-shadow:0 6px 24px rgba(15,23,42,.12)!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock a {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    height:100%!important;
    min-height:0!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:4px 1px!important;
    background:transparent!important;
    color:var(--t399-bottom-text,#334155)!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    text-decoration:none!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock a.is-active {
    background:rgba(15,76,129,.08)!important;
    color:var(--t399-bottom-active,#0f4c81)!important;
    transform:none!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock a .t472-mobile-dock-icon {
    display:flex!important;
    flex:0 0 22px!important;
    width:22px!important;
    height:22px!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
    line-height:1!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock a .t472-mobile-dock-icon svg {
    display:block!important;
    width:22px!important;
    height:22px!important;
    max-width:22px!important;
    max-height:22px!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock a b {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    font-size:clamp(9px,2.65vw,12px)!important;
    line-height:1.15!important;
    font-weight:750!important;
    letter-spacing:-.035em!important;
    text-align:center!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }
  body.nc-mobile-ui-399 .t472-mobile-dock a em[data-cart-count] {
    display:flex!important;
    position:absolute!important;
    top:0!important;
    right:max(0px,calc(50% - 25px))!important;
    min-width:18px!important;
    width:auto!important;
    height:18px!important;
    padding:0 4px!important;
    border-radius:12px!important;
    align-items:center!important;
    justify-content:center!important;
    font-style:normal!important;
    background:#f97316!important;
    color:#fff!important;
    font-size:10px!important;
    z-index:2!important;
  }
  /* No duplicate pseudo-hamburger, only the actual button character. */
  body.nc-mobile-ui-399 .nc-mobile-menu-btn::before,
  body.nc-mobile-ui-399 .nc-mobile-menu-btn::after {
    content:none!important;
    display:none!important;
  }
  body.nc-mobile-ui-399 .nc-mobile-menu-btn {
    font-size:24px!important;
    line-height:1!important;
    letter-spacing:0!important;
  }
  /* Explicitly reserve the dock region underneath the sticky purchase rail. */
  body.nc-mobile-ui-399 .t399-mobile-buybar {
    display:grid!important;
    position:fixed!important;
    z-index:10020!important;
    left:0!important;
    right:0!important;
    bottom:calc(var(--t473-dock-bottom) + var(--t473-dock-height) + var(--t473-dock-gap))!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:9px max(12px,env(safe-area-inset-left,0px))!important;
    grid-template-columns:minmax(85px,.68fr) minmax(0,1.55fr)!important;
    gap:10px!important;
    align-items:center!important;
    background:#fff!important;
    border:1px solid #e2e8f0!important;
    border-left:0!important;
    border-right:0!important;
    box-shadow:0 -4px 16px rgba(15,23,42,.08)!important;
    box-sizing:border-box!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-price,
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions {
    min-width:0!important;
    max-width:100%!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)!important;
    gap:8px!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar button {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    min-height:44px!important;
    height:46px!important;
    padding:6px 5px!important;
    margin:0!important;
    font-size:clamp(11px,3vw,15px)!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    overflow:hidden!important;
    border-radius:12px!important;
  }
  body.nc-mobile-ui-399:has(.t472-mobile-dock) {
    padding-bottom:var(--t473-content-bottom)!important;
  }
  body.nc-mobile-ui-399:has(.t472-mobile-dock):has(.t399-mobile-buybar) {
    padding-bottom:calc(var(--t473-content-bottom) + var(--t473-purchase-height))!important;
  }
  body.nc-mobile-ui-399 .nc-footer {
    margin-bottom:0!important;
  }
}
@media (min-width:761px) and (max-width:1180px) {
  body.nc-mobile-ui-399{--t473-dock-height:80px;--t473-purchase-height:82px;}
  body.nc-mobile-ui-399 .t472-mobile-dock{left:18px!important;right:18px!important;padding:9px 14px!important;gap:8px!important;}
  body.nc-mobile-ui-399 .t472-mobile-dock a b{font-size:13px!important;}
  body.nc-mobile-ui-399 .t399-mobile-buybar{padding:10px 18px!important;}
}
@media (max-width:360px) {
  body.nc-mobile-ui-399 .t472-mobile-dock {left:4px!important;right:4px!important;padding:5px 3px!important;gap:0!important;}
  body.nc-mobile-ui-399 .t472-mobile-dock a b {font-size:9px!important;letter-spacing:-.05em!important;}
  body.nc-mobile-ui-399 .t399-mobile-buybar{grid-template-columns:minmax(80px,.6fr) minmax(0,1.65fr)!important;gap:5px!important;padding:7px 8px!important;}
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions{gap:5px!important;}
  body.nc-mobile-ui-399 .t399-mobile-buybar button{font-size:11px!important;}
}
@media(min-width:1181px) {
  .t472-mobile-dock{display:none!important;}
}


/* v476 – purchase rail styled as a separate rounded card, matching the navigation dock.
   Preserves the v473 header, dock, cart actions and device breakpoints. */
@media (max-width:1180px) {
  body.nc-mobile-ui-399 {
    --t476-bar-side: max(8px, env(safe-area-inset-left, 0px));
    --t476-bar-right: max(8px, env(safe-area-inset-right, 0px));
    --t476-rail-gap: 10px;
    --t473-purchase-height: 76px;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar {
    left:var(--t476-bar-side)!important;
    right:var(--t476-bar-right)!important;
    width:auto!important;
    bottom:calc(var(--t473-dock-bottom) + var(--t473-dock-height) + var(--t476-rail-gap))!important;
    min-height:68px!important;
    height:auto!important;
    padding:10px 12px!important;
    border:1px solid #e2e8f0!important;
    border-radius:19px!important;
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 6px 24px rgba(15,23,42,.12)!important;
    grid-template-columns:minmax(0,.82fr) minmax(0,1.65fr)!important;
    gap:10px!important;
    overflow:hidden!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-price {
    min-width:0!important;
    overflow:hidden!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions {
    min-width:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)!important;
    gap:8px!important;
    align-items:stretch!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar button,
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions a {
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:46px!important;
    min-height:46px!important;
    border-radius:13px!important;
    margin:0!important;
    padding:6px 8px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:clamp(11px,3vw,15px)!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
  body.nc-mobile-ui-399:has(.t472-mobile-dock):has(.t399-mobile-buybar) {
    padding-bottom:calc(var(--t473-content-bottom) + var(--t473-purchase-height) + 8px)!important;
  }
}
@media (min-width:761px) and (max-width:1180px) {
  body.nc-mobile-ui-399 {
    --t476-bar-side:18px;
    --t476-bar-right:18px;
    --t473-purchase-height:78px;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar {
    padding:12px 16px!important;
    grid-template-columns:minmax(0,1fr) minmax(0,2fr)!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar button,
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions a{font-size:14px!important;}
}
@media (max-width:380px) {
  body.nc-mobile-ui-399 .t399-mobile-buybar {
    left:5px!important;
    right:5px!important;
    padding:8px 7px!important;
    gap:6px!important;
    grid-template-columns:minmax(75px,.72fr) minmax(0,1.8fr)!important;
    border-radius:16px!important;
  }
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions {gap:5px!important;}
  body.nc-mobile-ui-399 .t399-mobile-buybar button,
  body.nc-mobile-ui-399 .t399-mobile-buybar .t399-buybar-actions a {font-size:11px!important;padding:5px 3px!important;}
}
