/* =========================================================
   JOHN IAN — v2.1.6.2 Shopping Bag & Archive Grid Hotfix
   Terminology, notice alignment, curated routing presentation,
   and WooCommerce grid clearfix removal.
   ========================================================= */

/* Remove duplicate CMS / block page headings. The editorial intro is the
   single authoritative heading on the Shopping Bag screen. */
.ji-cart-experience .entry-header,
.ji-cart-experience .page-header,
.ji-cart-experience .entry-title,
.ji-cart-experience .wp-block-post-title,
.ji-cart-experience .entry-content > h1:first-child,
.ji-cart-experience .site-main > h1:first-child,
.ji-cart-experience .woocommerce > h1:first-child{
  display:none!important;
}

/* Shopping Bag notice: place the WooCommerce status glyph in its own stable
   flex column instead of absolutely positioning it over the message copy. */
.ji-cart-experience .woocommerce-message,
.ji-cart-experience .woocommerce-info,
.ji-cart-experience .woocommerce-error{
  position:relative;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
}
.ji-cart-experience .woocommerce-message::before,
.ji-cart-experience .woocommerce-info::before,
.ji-cart-experience .woocommerce-error::before{
  position:static!important;
  inset:auto!important;
  top:auto!important;
  left:auto!important;
  display:grid!important;
  flex:0 0 22px;
  width:22px;
  height:22px;
  margin:0!important;
  place-items:center;
  line-height:1!important;
  transform:none!important;
}
.ji-cart-experience .woocommerce-message .button,
.ji-cart-experience .woocommerce-info .button{
  align-self:center;
}

/* The editorial heading and summary title use the approved terminology. */
.ji-cart-intro h1{
  text-wrap:balance;
}
.ji-cart-experience .cart_totals h2{
  text-wrap:balance;
}

/* WooCommerce's legacy clearfix pseudo-elements become real CSS-grid items.
   Remove them only from customer-facing JOHN IAN product archive grids. */
.woocommerce-shop ul.products::before,
.woocommerce-shop ul.products::after,
.post-type-archive-product ul.products::before,
.post-type-archive-product ul.products::after,
.tax-product_cat ul.products::before,
.tax-product_cat ul.products::after,
.tax-product_tag ul.products::before,
.tax-product_tag ul.products::after,
.ji-commerce-grid::before,
.ji-commerce-grid::after,
.ji-shop-products ul.products::before,
.ji-shop-products ul.products::after{
  content:none!important;
  display:none!important;
}

/* Make the first actual product own grid cell one. */
.woocommerce-shop ul.products > li.product:first-of-type,
.post-type-archive-product ul.products > li.product:first-of-type,
.tax-product_cat ul.products > li.product:first-of-type,
.tax-product_tag ul.products > li.product:first-of-type{
  grid-column-start:1;
}

@media(max-width:700px){
  .ji-cart-experience .woocommerce-message,
  .ji-cart-experience .woocommerce-info,
  .ji-cart-experience .woocommerce-error{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr);
    gap:14px 14px!important;
    align-items:center!important;
  }
  .ji-cart-experience .woocommerce-message .button,
  .ji-cart-experience .woocommerce-info .button{
    grid-column:1/-1;
  }
}
