/* RC2.9.16.0.4 — Product Order Assistant Panel
   Fills the desktop product-page blank area with a safe live order summary.
   Frontend only: no checkout, cart, payment or database logic changes. */

@media (min-width: 992px){
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-product-order-assistant{
    display:block!important;
    margin-top:14px!important;
    border:1px solid #e1e7ee!important;
    border-radius:18px!important;
    background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important;
    padding:18px!important;
    box-shadow:0 12px 30px rgba(11,31,59,.065)!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-product-order-assistant .tw-card-kicker{
    display:block!important;
    margin-bottom:10px!important;
    color:#a61e2a!important;
    font-size:11px!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
    font-weight:950!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-head{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:14px!important;
    padding-bottom:14px!important;
    border-bottom:1px solid #edf1f5!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-head h3{
    margin:0 0 5px!important;
    color:#0b1f3b!important;
    font-size:20px!important;
    line-height:1.15!important;
    font-weight:950!important;
    letter-spacing:-.025em!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-head p{
    margin:0!important;
    color:#667085!important;
    font-size:12px!important;
    line-height:1.45!important;
    font-weight:650!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-head strong{
    flex:0 0 auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:92px!important;
    min-height:48px!important;
    padding:8px 12px!important;
    border-radius:14px!important;
    background:#0b1f3b!important;
    color:#ffffff!important;
    font-size:20px!important;
    line-height:1!important;
    box-shadow:0 10px 22px rgba(11,31,59,.16)!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-summary{
    margin:14px 0 0!important;
    display:grid!important;
    gap:9px!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-summary div{
    display:grid!important;
    grid-template-columns:120px minmax(0,1fr)!important;
    align-items:start!important;
    gap:10px!important;
    min-height:42px!important;
    padding:10px 11px!important;
    border:1px solid #edf1f5!important;
    border-radius:13px!important;
    background:#ffffff!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-summary dt{
    margin:0!important;
    color:#6b7585!important;
    font-size:11px!important;
    text-transform:uppercase!important;
    letter-spacing:.045em!important;
    font-weight:900!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-summary dd{
    margin:0!important;
    color:#0b1f3b!important;
    font-size:13px!important;
    line-height:1.35!important;
    font-weight:850!important;
    text-align:right!important;
    word-break:break-word!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-summary [data-assistant-toppings]{
    font-size:12.5px!important;
    font-weight:750!important;
    color:#344054!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-summary .is-warning{
    color:#a61e2a!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    margin-top:14px!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-add,
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back{
    min-height:46px!important;
    border-radius:13px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    font-size:12px!important;
    font-weight:950!important;
    text-decoration:none!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-add{
    border:0!important;
    background:#b91f2c!important;
    color:#ffffff!important;
    box-shadow:0 10px 22px rgba(185,31,44,.18)!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-add:hover,
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-add:focus-visible{
    background:#9f1724!important;
    outline:none!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back{
    border:1px solid #dce3eb!important;
    background:#ffffff!important;
    color:#0b1f3b!important;
  }
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:hover,
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:focus-visible{
    border-color:#c6a23a!important;
    color:#0b1f3b!important;
    outline:none!important;
  }
}

@media (max-width: 991.98px){
  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-product-order-assistant{
    display:none!important;
  }
}

/* RC2.9.16.0.6.1 — remove duplicate product-page Add to Basket button.
   Keep the left assistant as summary-only; the main sticky order bar remains the single purchase action. */
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-add{
  display:none!important;
}
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-actions{
  grid-template-columns:1fr!important;
}

/* RC2.9.16.0.6.2 — professional Back to Menu button inside Product Order Assistant */
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-actions{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  margin-top:14px!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back{
  width:auto!important;
  min-width:190px!important;
  max-width:240px!important;
  min-height:44px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:11px 20px!important;
  border-radius:999px!important;
  border:1.5px solid #0B1F3B!important;
  background:#ffffff!important;
  color:#0B1F3B!important;
  font-weight:900!important;
  font-size:13px!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:0 8px 20px rgba(11,31,59,.06)!important;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back::before{
  content:"←";
  font-size:15px;
  font-weight:950;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:hover,
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:focus-visible{
  background:#0B1F3B!important;
  color:#ffffff!important;
  box-shadow:0 12px 26px rgba(11,31,59,.16)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}


/* RC2.9.16.0.8.7 — consistent Back to Menu UI on normal pizza/product page */
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:44px!important;
  padding:11px 20px!important;
  border-radius:999px!important;
  border:1.5px solid rgba(11,31,59,.22)!important;
  background:#ffffff!important;
  color:#0B1F3B!important;
  font-weight:950!important;
  font-size:13px!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:0 10px 24px rgba(11,31,59,.08)!important;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:hover,
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:focus-visible{
  background:#A61E2A!important;
  color:#ffffff!important;
  border-color:#A61E2A!important;
  box-shadow:0 14px 34px rgba(166,30,42,.24)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-poa-back:active{
  background:#0B1F3B!important;
  color:#ffffff!important;
  border-color:#0B1F3B!important;
  transform:translateY(0)!important;
}

/* RC2.9.16.0.8.8 — unify TOP Back to Menu button on normal product pages */
html body.fc-ordering-body.fc-storefront .tw-product-detail-section a.tw-back-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:44px!important;
  padding:12px 22px!important;
  margin:0 0 22px!important;
  border-radius:10px!important;
  border:1.5px solid #0B1F3B!important;
  background:#0B1F3B!important;
  color:#ffffff!important;
  font-weight:950!important;
  font-size:14px!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:0 12px 28px rgba(11,31,59,.18)!important;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}

html body.fc-ordering-body.fc-storefront .tw-product-detail-section a.tw-back-link:hover,
html body.fc-ordering-body.fc-storefront .tw-product-detail-section a.tw-back-link:focus-visible{
  background:#A61E2A!important;
  border-color:#A61E2A!important;
  color:#ffffff!important;
  box-shadow:0 15px 36px rgba(166,30,42,.25)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}

html body.fc-ordering-body.fc-storefront .tw-product-detail-section a.tw-back-link:active{
  background:#07172e!important;
  border-color:#07172e!important;
  transform:translateY(0)!important;
}

/* RC2.9.16.0.8.13 — keep product Current Total + Add to Basket visible */
html body.fc-ordering-body.fc-storefront .fc-product-experience .tw-product-sticky-action.fc-sticky-order-bar{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:18px!important;
  transform:translateX(-50%)!important;
  width:min(760px, calc(100vw - 32px))!important;
  max-width:760px!important;
  z-index:9990!important;
  margin:0!important;
  border-radius:18px!important;
  padding:12px 14px!important;
  background:#0B1F3B!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 22px 55px rgba(11,31,59,.32)!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-add-button{
  background:#A61E2A!important;
  color:#ffffff!important;
  border:0!important;
  border-radius:14px!important;
  font-weight:950!important;
  min-height:52px!important;
  box-shadow:0 12px 26px rgba(166,30,42,.28)!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-add-button:hover,
html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-add-button:focus-visible{
  background:#8F1823!important;
  color:#ffffff!important;
  transform:translateY(-1px)!important;
  box-shadow:0 16px 32px rgba(166,30,42,.34)!important;
  outline:none!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .tw-product-total-bar.fc-product-total-summary{
  margin-bottom:92px!important;
}

html body.fc-ordering-body.fc-storefront:has(.fc-product-experience .tw-product-sticky-action.fc-sticky-order-bar){
  padding-bottom:105px!important;
}

@media(max-width:575px){
  html body.fc-ordering-body.fc-storefront .fc-product-experience .tw-product-sticky-action.fc-sticky-order-bar{
    left:10px!important;
    right:10px!important;
    bottom:10px!important;
    width:auto!important;
    max-width:none!important;
    transform:none!important;
    padding:10px!important;
    border-radius:16px!important;
  }

  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-price{
    font-size:22px!important;
  }

  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-add-button{
    min-width:138px!important;
    min-height:48px!important;
    font-size:13px!important;
  }
}

/* RC2.9.16.0.8.31 — mobile product Add to Basket real fix
   Hide global floating Basket on product pages so it cannot cover Add to Basket. */
html body.fc-ordering-body.fc-storefront .fc-product-experience ~ .tw-floating-cart,
html body.fc-ordering-body.fc-storefront:has(.fc-product-experience) .tw-floating-cart,
html body.fc-ordering-body.fc-storefront .tw-floating-cart.tw-cart-nav{
  display:none!important;
  pointer-events:none!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .tw-product-sticky-action.fc-sticky-order-bar{
  z-index:10020!important;
  pointer-events:auto!important;
}

html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-add-button{
  pointer-events:auto!important;
  touch-action:manipulation!important;
}

@media(max-width:767.98px){
  html body.fc-ordering-body.fc-storefront .fc-product-experience .tw-product-sticky-action.fc-sticky-order-bar{
    left:10px!important;
    right:10px!important;
    bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;
  }

  html body.fc-ordering-body.fc-storefront .fc-product-experience .fc-sticky-add-button{
    min-width:150px!important;
    flex:1 1 auto!important;
  }
}


/* RC2.9.16.0.8.32 — mobile basket + validation polish */

/* Basket drawer is always above product ordering controls. */
.tw-cart-overlay.show{
  z-index:10030!important;
}

.tw-mini-cart.open{
  z-index:10031!important;
}

/* Product CTA must disappear while mini basket is open. */
body.fc-mini-cart-open .fc-product-experience .tw-product-sticky-action.fc-sticky-order-bar{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateY(130%)!important;
}

/* Keep basket footer fully visible, including iPhone safe area. */
body.fc-mini-cart-open .tw-mini-cart-foot{
  position:relative!important;
  z-index:2!important;
  padding-bottom:calc(18px + env(safe-area-inset-bottom, 0px))!important;
  flex:0 0 auto!important;
}

/* Allow basket item area to scroll without covering footer. */
body.fc-mini-cart-open .tw-mini-cart-body{
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}

/* Mobile validation/toast should sit above CTA instead of over options. */
@media(max-width:767.98px){

  body.fc-storefront:has(.fc-product-experience) .tw-commerce-toast{
    left:16px!important;
    right:16px!important;
    width:auto!important;
    max-width:none!important;
    bottom:calc(150px + env(safe-area-inset-bottom, 0px))!important;
    transform:translateY(14px)!important;
    padding:12px 16px!important;
    border-radius:16px!important;
    text-align:center!important;
    line-height:1.35!important;
    white-space:normal!important;
    font-size:14px!important;
    z-index:10025!important;
    box-shadow:0 12px 30px rgba(11,31,59,.24)!important;
  }

  body.fc-storefront:has(.fc-product-experience) .tw-commerce-toast.show{
    transform:translateY(0)!important;
  }

  /* Once basket opens no product alert should remain floating over it. */
  body.fc-mini-cart-open .tw-commerce-toast{
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  body.fc-mini-cart-open{
    overflow:hidden!important;
  }

  body.fc-mini-cart-open .tw-mini-cart{
    height:100dvh!important;
    max-height:100dvh!important;
  }
}
