/* CRAFT v1.8.61 | Launch-only browser/UI fixes. */
/* 1. Keep mobile shopping bag quantity readable (legacy CSS hid it). */
@media (max-width:900px) {
  .v22-header-actions .v22-cart {
    position:relative!important; overflow:visible!important;
    display:inline-flex!important; align-items:center!important;
    justify-content:center!important; width:44px!important;
    height:44px!important; flex:0 0 44px!important;
  }
  .v22-header-actions .v22-cart .bag-count {
    display:grid!important; place-items:center!important;
    position:absolute!important; top:0!important; right:-2px!important;
    left:auto!important; bottom:auto!important;
    width:auto!important; min-width:18px!important; height:18px!important;
    padding:0 4px!important; margin:0!important;
    border-radius:999px!important; background:#c98268!important;
    color:#fff9f1!important; font-size:10px!important;
    font-weight:800!important; line-height:1!important;
    letter-spacing:0!important; transform:none!important;
    pointer-events:none!important; z-index:2!important;
  }
  .v22-header-actions .v22-cart.is-empty .bag-count {display:none!important}
}

/* 2. Classic checkout must fit a 320px–430px iPhone viewport, including
   gateway/CodeRockz controls and custom summary. No horizontal clipping. */
@media (max-width:900px) {
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-shell,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-shell .container,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout form.checkout,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-grid,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-form,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-col,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-card,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-card {
    box-sizing:border-box!important;
    min-width:0!important; max-width:100%!important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-grid {
    display:grid!important; width:100%!important;
    grid-template-columns:minmax(0,1fr)!important; gap:20px!important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-col {
    width:100%!important; position:static!important; top:auto!important;
    order:-1!important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-card,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-card {
    width:100%!important;
  }
  body.woocommerce-checkout .summary-head {min-width:0!important;flex-wrap:wrap!important;gap:8px 12px!important}
  body.woocommerce-checkout .summary-head h2 {min-width:0!important;overflow-wrap:break-word!important}
  body.woocommerce-checkout .summary-items,.woocommerce-checkout .summary-item,
  body.woocommerce-checkout .summary-copy {min-width:0!important;max-width:100%!important}
  body.woocommerce-checkout .summary-item {
    grid-template-columns:minmax(0,60px) minmax(0,1fr) max-content!important;
    gap:9px!important;
  }
  body.woocommerce-checkout .summary-thumb {width:60px!important;height:64px!important}
  body.woocommerce-checkout .summary-name,.woocommerce-checkout .summary-meta {
    min-width:0!important;overflow-wrap:break-word!important;
    word-break:normal!important;
  }
  body.woocommerce-checkout .summary-price,
  body.woocommerce-checkout .summary-totals .summary-line strong,
  body.woocommerce-checkout .summary-totals .woocommerce-Price-amount {
    white-space:nowrap!important; overflow-wrap:normal!important;
    word-break:keep-all!important;
  }
  body.woocommerce-checkout .summary-totals .summary-line {
    display:grid!important; grid-template-columns:minmax(0,1fr) max-content!important;
    gap:6px 8px!important; align-items:start!important;
  }
  body.woocommerce-checkout .summary-totals .summary-line strong {
    min-width:0!important; justify-self:end!important; text-align:right!important;
  }
  body.woocommerce-checkout #craftDeliveryPickupFieldsGrid,
  body.woocommerce-checkout #craftDeliveryPickupPluginFields,
  body.woocommerce-checkout #coderockz_woo_delivery_setting_wrapper,
  body.woocommerce-checkout #coderockz_woo_delivery_delivery_selection_field,
  body.woocommerce-checkout .craft-order-type-radio,
  body.woocommerce-checkout .woocommerce-checkout-payment,
  body.woocommerce-checkout .native-payment #payment,
  body.woocommerce-checkout .payment_methods,
  body.woocommerce-checkout .payment_box,
  body.woocommerce-checkout .woocommerce-input-wrapper,
  body.woocommerce-checkout .select2-container {
    box-sizing:border-box!important; min-width:0!important;
    max-width:100%!important; width:100%!important;
  }
  body.woocommerce-checkout .craft-order-type-radio {
    display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.woocommerce-checkout .craft-order-type-choice,
  body.woocommerce-checkout .craft-order-type-text {
    min-width:0!important;overflow-wrap:break-word!important;
  }
  body.woocommerce-checkout .native-payment .wc_payment_method > label {
    min-width:0!important; flex-wrap:wrap!important;
  }
  body.woocommerce-checkout .native-payment .wc_payment_method label img {max-width:90px!important}
  body.woocommerce-checkout .checkout-note {min-width:0!important;max-width:100%!important}
}
@media (max-width:360px) {
  body.woocommerce-checkout .summary-item {
    grid-template-columns:52px minmax(0,1fr) max-content!important;
    gap:6px!important;
  }
  body.woocommerce-checkout .summary-thumb {width:52px!important;height:57px!important}
  body.woocommerce-checkout .summary-card {padding-left:13px!important;padding-right:13px!important}
  body.woocommerce-checkout .summary-name {font-size:18px!important}
  body.woocommerce-checkout .craft-order-type-choice {padding-left:8px!important;padding-right:8px!important}
}

/* 3. Keep currency sign and amount together in order confirmation, including
   the native WooCommerce order table for order #43290 and other orders. */
@media (max-width:900px) {
  body.woocommerce-order-received #craftThankyou .woocommerce-Price-amount,
  body.woocommerce-order-received #craftThankyou .woocommerce-Price-amount bdi,
  body.woocommerce-order-received #craftThankyou .woocommerce-Price-currencySymbol,
  body.woocommerce-order-received #craftThankyou .thankyou-meta-grid strong:has(.woocommerce-Price-amount) {
    white-space:nowrap!important; word-break:keep-all!important;
    overflow-wrap:normal!important;
  }
  body.woocommerce-order-received #craftThankyou .woocommerce-Price-amount {
    display:inline-block!important;
  }
}

/* 6. Retain the native plugin fields but suppress duplicate untranslated heading. */
body.woocommerce-checkout .craft-duplicate-plugin-heading-hidden{display:none!important}

/* CRAFT 1.8.75 — Mobile-only cart count visibility, including product pages.
   Earlier page CSS hides the badge at mobile widths; leave desktop untouched. */
@media (max-width:900px) {
  body .v22-header-actions a.v22-cart:not(.is-empty) > span.bag-count {
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    position:absolute!important;
    top:0!important;
    right:-2px!important;
    left:auto!important;
    bottom:auto!important;
    min-width:18px!important;
    width:auto!important;
    height:18px!important;
    margin:0!important;
    padding:0 4px!important;
    z-index:8!important;
    transform:none!important;
    place-items:center!important;
  }
  body .v22-header-actions a.v22-cart.is-empty > span.bag-count {
    display:none!important;
  }
}
