:root{
  --zmnav-purple:#6D28D9;
  --zmnav-purple-d:#5B21B6;
  --zmnav-yellow:#F5C518;
  --zmnav-ink:#1f2030;
  --zmnav-grey:#777;
  --zmnav-line:#eee;
}

/* Hidden on desktop, only show on mobile/tablet */
.zmnav{ display:none; }
.zmnav-spacer{ display:none; }

@media(max-width:820px){

  /* ===== Hide Astra footer on mobile ===== */
  .site-footer,
  footer.site-footer,
  .ast-small-footer,
  #colophon{
    display:none !important;
  }

  /* ===== Hide the shop / archive / single page title heading on mobile ===== */
  body.post-type-archive-product .woocommerce-products-header,
  body.post-type-archive-product .woocommerce-products-header__title,
  body.post-type-archive-product .ast-archive-description,
  body.post-type-archive-product .entry-title,
  body.post-type-archive-product .ast-archive-title,
  body.tax-product_cat .woocommerce-products-header,
  body.tax-product_cat .woocommerce-products-header__title,
  body.tax-product_cat .ast-archive-description,
  body.tax-product_cat .ast-archive-title,
  body.tax-product_cat .entry-title,
  body.tax-product_tag .woocommerce-products-header,
  body.tax-product_tag .ast-archive-description,
  body.single-product .product_title.entry-title,
  body.single-product .entry-title,
  .woocommerce-products-header,
  .woocommerce-products-header__title,
  .ast-archive-description .ast-archive-title{
    display:none !important;
  }

  /* Space so content isn't hidden behind the fixed nav */
  .zmnav-spacer{ display:block; height:72px; }

  .zmnav{
    display:flex;
    position:fixed;
    left:0; right:0; bottom:0;
    z-index:9990;
    background:#fff;
    border-top:1px solid var(--zmnav-line);
    box-shadow:0 -4px 20px rgba(0,0,0,.07);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    padding-bottom:env(safe-area-inset-bottom, 0);
  }

  /* ===== HOME 5-item nav ===== */
  .zmnav-home{
    justify-content:space-around;
    align-items:center;
    padding:9px 0 11px;
  }
  .zmnav-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
    color:var(--zmnav-grey);
    text-decoration:none;
    font-size:11px;
    font-weight:500;
    transition:.15s;
  }
  .zmnav-item span{ font-size:11px; }
  .zmnav-item.zmnav-active{ color:var(--zmnav-purple); font-weight:700; }
  .zmnav-item.zmnav-active span{ font-weight:700; }
  .zmnav-cart-wrap{ position:relative; display:flex; }
  .zmnav-badge{
    position:absolute; top:-6px; right:-8px;
    background:var(--zmnav-purple); color:#fff;
    font-size:9px; font-weight:700;
    min-width:15px; height:15px; padding:0 3px;
    border-radius:9px; display:flex; align-items:center; justify-content:center;
  }

  /* ===== SHOP Sort/Filter ===== */
  .zmnav-shop{ align-items:stretch; }
  .zmnav-sort,.zmnav-filter{
    flex:1;
    display:flex; align-items:center; justify-content:center; gap:9px;
    padding:14px; background:none; border:0; cursor:pointer;
    color:var(--zmnav-ink); font-family:inherit;
  }
  .zmnav-sort{ border-right:1px solid var(--zmnav-line); }
  .zmnav-sort-txt{ display:flex; flex-direction:column; line-height:1.2; text-align:left; }
  .zmnav-sort-txt strong{ font-size:14px; font-weight:700; }
  .zmnav-sort-txt em{ font-size:11px; font-style:normal; color:var(--zmnav-purple); }
  .zmnav-filter span{ font-size:14px; font-weight:700; }

  /* ===== SINGLE buy bar ===== */
  .zmnav-single{
    align-items:center; gap:10px; padding:11px 14px;
  }
  .zmnav-qty{
    display:flex; flex-direction:column; align-items:center;
    border:1px solid #ddd; border-radius:10px; padding:4px 8px;
  }
  .zmnav-qty-label{ font-size:9px; color:#999; letter-spacing:.5px; }
  .zmnav-qty-box{ display:flex; align-items:center; gap:6px; }
  .zmnav-qm,.zmnav-qp{
    background:none; border:0; font-size:16px; color:#555; cursor:pointer; width:18px; line-height:1;
  }
  .zmnav-qty-val{
    width:26px; text-align:center; border:0; font-size:15px; font-weight:700; color:var(--zmnav-ink);
    -moz-appearance:textfield;
  }
  .zmnav-qty-val::-webkit-outer-spin-button,
  .zmnav-qty-val::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
  .zmnav-add{
    width:54px; height:50px; background:var(--zmnav-purple);
    border:0; border-radius:12px; cursor:pointer;
    display:flex; align-items:center; justify-content:center; position:relative;
  }
  .zmnav-add:active{ background:var(--zmnav-purple-d); }
  .zmnav-add-plus{
    position:absolute; top:7px; right:11px; color:#fff; font-size:13px; font-weight:700;
  }
  .zmnav-buy{
    flex:1; height:50px; background:var(--zmnav-yellow);
    border:0; border-radius:12px; cursor:pointer;
    display:flex; align-items:center; justify-content:center; gap:7px;
    font-size:15px; font-weight:800; color:#111; letter-spacing:.3px;
    font-family:inherit;
  }
  .zmnav-buy:active{ filter:brightness(.95); }
}
