/* ============================================================
   Metta Pic v14.8 — Popup flush bottom · unified mobile box · counter
   ============================================================ */

/* ---- Checkout popup: flush bottom, 90% height, top gap ---- */
#mpQckSheet.is-open,
.mp-qck-sheet.is-open,
html body #mpQckSheet.is-open {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: env(safe-area-inset-bottom, 0) !important;
  height: 90vh !important;
  height: 90dvh !important;
  max-height: 90vh !important;
  max-height: 90dvh !important;
  border-radius: 22px 22px 0 0 !important;
  z-index: 1000000 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 -12px 40px rgba(7, 21, 47, 0.25) !important;
  transform: translateY(0) !important;
}
#mpQckOverlay.is-open {
  z-index: 999999 !important;
}
.mp-qck-sheet.is-open .mp-qck-form,
.mp-qck-sheet.is-open #mpQckForm,
.mp-qck-sheet.is-open .mp-qck-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  max-height: none !important;
  min-height: 0 !important;
}
/* slight top visual gap via overlay padding feel — sheet itself sticks to bottom */

/* ---- Counter animation colors + micro bounce ---- */
.mp-price-typing {
  transition: color 0.15s ease !important;
  display: inline-block !important;
}
.mp-price-typing.mp-price-up {
  color: #16a34a !important;
  animation: mpCountUp 0.22s ease-out !important;
}
.mp-price-typing.mp-price-down {
  color: #dc2626 !important;
  animation: mpCountDown 0.22s ease-out !important;
}
#mpVariantTotal.mp-price-typing.mp-price-up,
.mp-var-total .mp-price-typing.mp-price-up {
  color: #4ade80 !important;
}
#mpVariantTotal.mp-price-typing.mp-price-down,
.mp-var-total .mp-price-typing.mp-price-down {
  color: #f87171 !important;
}
#mpStickyPriceVal.mp-price-typing.mp-price-up {
  color: #16a34a !important;
}
#mpStickyPriceVal.mp-price-typing.mp-price-down {
  color: #dc2626 !important;
}
@keyframes mpCountUp {
  0% { transform: translateY(6px); opacity: 0.55; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes mpCountDown {
  0% { transform: translateY(-6px); opacity: 0.55; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---- MOBILE: one unified white box for image + title + variants + buy ---- */
@media (max-width: 900px) {
  .mp-single-product-page .mp-product-single-grid,
  .mp-single-product-page .mp-single-layout,
  body.single-product .mp-product-single-grid {
    display: block !important;
    background: #fff !important;
    border: 1px solid #e8ecf2 !important;
    border-radius: 20px !important;
    padding: 12px !important;
    margin: 0 0 16px !important;
    box-shadow: 0 6px 22px rgba(7, 21, 47, 0.06) !important;
    overflow: hidden !important;
  }

  /* kill nested box borders/backgrounds inside the unified card */
  .mp-single-product-page .mp-single-gallery,
  .mp-single-product-page .mp-single-info,
  .mp-single-product-page .mp-variants,
  body.single-product .mp-single-gallery,
  body.single-product .mp-single-info,
  body.single-product .mp-variants {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    border-radius: 0 !important;
  }

  .mp-single-product-page .mp-gallery-main,
  body.single-product .mp-gallery-main {
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #f7f9fc !important;
    border: none !important;
    aspect-ratio: 1 !important;
    margin-bottom: 12px !important;
  }
  .mp-gallery-main img {
    border-radius: 12px !important;
  }
  .mp-gallery-thumbs { display: none !important; }

  .mp-single-info h1 {
    font-size: 17px !important;
    line-height: 1.45 !important;
    margin: 0 0 12px !important;
    padding: 0 2px !important;
    color: #07152f !important;
  }
  .mp-single-info .eyebrow,
  .mp-single-info .mp-single-rating,
  .mp-single-info .mp-single-description,
  .mp-single-info .price {
    display: none !important;
  }

  .mp-variants {
    margin-bottom: 0 !important;
  }
  .mp-var-group {
    margin-bottom: 12px !important;
  }
  .mp-var-total {
    margin-top: 4px !important;
    border-radius: 12px !important;
  }
  .single_add_to_cart_button,
  .mp-buy-now {
    margin-top: 10px !important;
    border-radius: 12px !important;
  }

  /* info boxes etc stay outside the unified card */
  .mp-product-fullwidth,
  .mp-product-info-boxes,
  .mp-product-accordion,
  .woocommerce-tabs {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}
