/* Keep the complete native header above page widgets and the floating contact
   button. The wrapper stays below Elementor dialogs and WordPress's toolbar;
   no transform or containment changes the fixed search/cart overlays. */
body.cia-native-store .elementor-location-header:has(.cia-native-header) {
  position: sticky;
  top: 0;
  z-index: 1000;
}
body.cia-native-store.admin-bar .elementor-location-header:has(.cia-native-header) {
  top: 32px;
}
@media (max-width: 782px) {
  body.cia-native-store.admin-bar .elementor-location-header:has(.cia-native-header) {
    top: 46px;
  }
}
@media (max-width: 600px) {
  /* WordPress's toolbar scrolls with the page at phone widths. Its initial
     space is already reserved by WordPress, so the sticky header uses top:0. */
  body.cia-native-store.admin-bar .elementor-location-header:has(.cia-native-header) {
    top: 0;
  }
}

/* The official cart and checkout retain their existing Elementor/WooCommerce
   widgets. Scope their visual corrections to these two routes only. */
body.cia-native-store:is(.cia-route-cart,.cia-route-checkout) .woocommerce,
body.cia-native-store:is(.cia-route-cart,.cia-route-checkout)
.woocommerce :is(table,input,select,textarea,label,button,.button,.amount,.product-name a) {
  font-family:Inter,system-ui,sans-serif!important;
  letter-spacing:normal;
}
body.cia-native-store:is(.cia-route-cart,.cia-route-checkout)
.woocommerce :is(h2,h3) {
  font-family:Archivo,system-ui,sans-serif!important;
  color:#16140F;
  line-height:1.25;
}
body.cia-native-store:is(.cia-route-cart,.cia-route-checkout)
.woocommerce table.shop_table {
  background:#fff;
  border:1px solid #E4DCD0!important;
  border-radius:12px;
  font-size:14px;
}
body.cia-native-store:is(.cia-route-cart,.cia-route-checkout)
.woocommerce table.shop_table :is(th,td) {
  border-color:#E4DCD0!important;
  color:#453F36;
}
body.cia-native-store.cia-route-cart .woocommerce td.actions .button {
  background:#fff!important;
  color:#16140F!important;
  border:1px solid #CFC4B4!important;
  border-radius:6px!important;
}
body.cia-native-store:is(.cia-route-cart,.cia-route-checkout)
.woocommerce :is(.checkout-button,#place_order) {
  background:#D24B16!important;
  color:#fff!important;
  border:1px solid #A93A0E!important;
  border-radius:6px!important;
  font-weight:600;
  white-space:normal;
}

@media (max-width:767px) {
  /* Let the existing page containers shrink; do not hide their overflow. */
  body.cia-native-store.cia-route-checkout main
  :is(.e-con,.e-con-inner,.elementor-container,.elementor-column,.elementor-widget-wrap),
  body.cia-native-store.cia-route-checkout
  :is(.elementor-widget-woocommerce-checkout-page,
      .elementor-widget-woocommerce-checkout-page .elementor-widget-container) {
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box;
  }
  /* Elementor's desktop column minimums must not constrain a phone viewport. */
  body.cia-native-store.cia-route-checkout .e-checkout__container {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:24px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body.cia-native-store.cia-route-checkout
  :is(.e-checkout__column,.e-checkout__column-inner,form.checkout,
      #customer_details,.woocommerce-billing-fields,.woocommerce-shipping-fields,
      .woocommerce-additional-fields,.woocommerce-checkout-review-order) {
    float:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box;
  }
  body.cia-native-store.cia-route-checkout .e-checkout__column {
    grid-column:1!important;
    grid-row:auto!important;
  }
  body.cia-native-store.cia-route-checkout form.checkout
  :is(.col2-set,.col-1,.col-2,.form-row-first,.form-row-last,.form-row-wide) {
    float:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box;
  }
  body.cia-native-store.cia-route-checkout .woocommerce
  :is(input.input-text,textarea,select,.select2-container) {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box;
    font-size:16px!important;
  }
  body.cia-native-store.cia-route-checkout
  :is(.select2-selection__rendered,.select2-search__field) {
    font-size:16px!important;
  }
  body.cia-native-store.cia-route-checkout .woocommerce
  :is(#payment,.payment_box,.payment_box fieldset,.payment_box .form-row) {
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box;
    overflow-wrap:anywhere;
  }
  body.cia-native-store.cia-route-checkout .woocommerce
  :is(#payment ul.payment_methods,#payment div.form-row) {
    padding:16px 14px;
  }
  body.cia-native-store.cia-route-checkout .woocommerce #payment .payment_box {
    margin-inline:0;
    padding:14px;
  }
  body.cia-native-store.cia-route-checkout .woocommerce #payment iframe {
    max-width:100%!important;
  }
  body.cia-native-store.cia-route-checkout .woocommerce-checkout-review-order-table {
    width:100%!important;
    table-layout:fixed;
  }
  body.cia-native-store.cia-route-checkout .woocommerce-checkout-review-order-table :is(th,td) {
    padding:10px 8px!important;
    overflow-wrap:anywhere;
  }
  body.cia-native-store.cia-route-checkout .woocommerce-checkout-review-order-table .product-name { width:60%; }
  body.cia-native-store.cia-route-checkout .woocommerce-checkout-review-order-table .product-total { width:40%; }
  body.cia-native-store.cia-route-checkout .woocommerce #place_order {
    float:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:48px;
    box-sizing:border-box;
    padding:14px 16px!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
    line-height:1.4!important;
  }
  /* Gateway visibility, radios, validation and disabled states stay native. */
}
