/* Pleuvoir Flowers - mobile fixes for product page, checkout and order-placed page.
   Loaded last (after store.css and features.css) so it can override them safely. */

/* ---------- Global safety ---------- */
body.store-body{overflow-x:clip}
.store-body img,.store-body video,.store-body svg{max-width:100%}

/* iOS Safari zooms the page when an input font is below 16px, which makes
   forms look "not responsive". Keep every field at 16px on phones/tablets. */
@media(max-width:900px){
  .store-body input:not([type=checkbox]):not([type=radio]),
  .store-body select,
  .store-body textarea{font-size:16px!important}
}

/* ---------- Product details page ---------- */
/* catalog.css turns .add-to-cart-form into a 2-column grid (1fr 86px, max 410px).
   On the product page that squeezed the qty box + Add to bag into one narrow cell. */
.pdp-form{display:block;max-width:none;margin-top:1.2rem}
.pdp-form .pdp-field{display:block;margin-bottom:1rem}
.pdp-form .pdp-field textarea{width:100%;font-size:16px}
.pdp-buy{display:flex;align-items:stretch;gap:.8rem;width:100%}
.pdp-buy .qty{flex:0 0 auto}
.pdp-buy .qty button{flex:none;width:44px;min-height:48px;grid-column:auto}
.pdp-buy .qty input{width:46px;min-width:0;padding:0;border:0;background:transparent;font-size:16px}
.pdp-buy .pdp-add{flex:1 1 auto;width:auto;min-width:0;min-height:48px;white-space:nowrap;grid-column:auto}
.pdp-price{flex-wrap:wrap;row-gap:.2rem}

@media(max-width:900px){
  .pdp{padding-top:.4rem}
  .pdp-info h1{font-size:1.6rem}
  .pdp-price strong{font-size:1.5rem}
  .pdp-actions{flex-direction:column;gap:.6rem}
  .pdp-actions>a{width:100%}
  .notify-row{flex-direction:column}
  .notify-row input[type=text],.notify-row .btn-brand{width:100%;min-width:0}
  .pdp-thumb{width:64px;height:64px;flex:none}

  /* Sticky buy bar: slides in only after the main Add to bag button has scrolled
     out of view, so there are never two identical buttons on screen together. */
  .buybar{transform:translateY(110%);transition:transform .25s ease;pointer-events:none}
  .buybar.is-visible{transform:none;pointer-events:auto}
  .buybar .btn-brand{min-height:46px;white-space:nowrap}
  body.store-body{padding-bottom:0}
  body.store-body:has(.buybar.is-visible){padding-bottom:4.6rem}
}
@media(prefers-reduced-motion:reduce){.buybar{transition:none}}

/* ---------- Checkout page ---------- */
.checkout-fields label{display:block}
.checkout-fields label>span{display:inline}
.checkout-fields label>input,.checkout-fields label>select,.checkout-fields label>textarea{display:block;margin-top:7px}
.checkout-line>span{min-width:0;overflow-wrap:anywhere}

@media(max-width:650px){
  .page-head{padding:1.4rem 0 .6rem}
  .checkout-page{padding-top:12px;padding-bottom:40px}
  .checkout-layout{gap:16px}
  .checkout-form,.checkout-summary{padding:16px;border-radius:12px}
  .checkout-form h2,.checkout-summary h2{font-size:1.3rem;margin-bottom:14px}
  .checkout-fields{gap:14px}
  .checkout-fields input,.checkout-fields select,.checkout-fields textarea{min-height:48px;padding:11px 12px}
  .checkout-page select{min-height:48px}
  .checkout-address-card{padding:12px}
  .payment-choice{padding:12px}
  .checkout-terms{margin:16px 0}
  .checkout-submit{min-height:52px;font-size:1rem;border-radius:999px}
  .coupon-box form{flex-wrap:nowrap}
  body:has(.checkout-page) .wa-float{display:none}
}

/* ---------- Order placed page ---------- */
.steps-num{flex:none;width:34px;height:34px;aspect-ratio:1}
.steps-compact li>div{min-width:0}
.complete-total strong{white-space:nowrap}

@media(max-width:650px){
  /* catalog.css used margin:30px 16px here, which pushed the card off-centre. */
  .checkout-complete{margin:20px auto 32px;padding:24px 18px;width:calc(100% - 32px)}
  .checkout-complete h1{font-size:2rem}
  .steps-compact{margin:1.2rem 0}
  .steps-compact li{padding:.9rem 1rem;gap:.8rem}
  .complete-actions{flex-direction:column;align-items:stretch;gap:.6rem}
  .complete-actions .btn-wa,.complete-actions .btn-soft{width:100%;text-align:center}
  .complete-actions .continue-shopping{margin-top:.4rem}
  body:has(.checkout-complete) .wa-float{display:none}
}
