/* PIYAMO v2.0.6: one footer, treasure dock, and back-to-top experience.
 * Identical layout on Shop, product, cart, checkout, account and content pages.
 * Keep the fixed cart visible while scrolling (including inside the footer).
 * Keyboard-safe states remain protected so forms can be completed comfortably.
 */
@media (max-width:767px) {
  :root { --piyamo-dock-clearance: calc(81px + env(safe-area-inset-bottom, 0px)); }

  /* A single, consistent, pale-lavender mobile footer on every public page. */
  html body footer.piyamo-mobile-footer,
  html body.single-product footer.piyamo-mobile-footer,
  html body.woocommerce-shop footer.piyamo-mobile-footer,
  html body.woocommerce-cart footer.piyamo-mobile-footer,
  html body.woocommerce-checkout footer.piyamo-mobile-footer,
  html body.woocommerce-account footer.piyamo-mobile-footer,
  html body.piyamo-mobile-shop-ui-active footer.piyamo-mobile-footer {
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    /* Space under copyright is scrolled underneath the fixed dock. */
    padding:0 0 var(--piyamo-dock-clearance) !important;
    box-sizing:border-box !important;
    border:0 !important;
    border-top:1px solid rgba(123,90,124,.12) !important;
    border-radius:0 !important;
    background:linear-gradient(180deg,#f7eff4 0%,#ebe1e8 100%) !important;
    color:#3c2f3a !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-inner,
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-brand,
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-links-grid,
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-trust,
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-security {
    width:100% !important;
    box-sizing:border-box !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    box-shadow:none !important;
  }
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-inner {
    padding:0 !important;
    background:transparent !important;
  }
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-links-grid {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:18px 18px !important;
    padding:22px 16px !important;
    background:transparent !important;
  }
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-trust {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-security {
    display:grid !important;
    grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr) !important;
    padding:17px 16px !important;
    gap:12px !important;
  }
  html body footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom,
  html body.single-product footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom,
  html body.woocommerce-cart footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom,
  html body.woocommerce-checkout footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom,
  html body.woocommerce-account footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom,
  html body.piyamo-mobile-store-chrome footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom,
  html body.piyamo-mobile-shop-ui-active footer.piyamo-mobile-footer .piyamo-mobile-footer-bottom {
    display:flex !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:12px 14px 13px !important;
    box-sizing:border-box !important;
    border:0 !important;
    color:#6e626a !important;
    font-size:9.5px !important;
    line-height:1.5 !important;
    box-shadow:none !important;
    background:transparent !important;
  }
  /* Desktop/widget footer is always replaced by this shared mobile footer. */
  html body footer.site-footer { display:none !important; }

  /* Global floating treasure: same frosted card everywhere, no archive rules. */
  html body .piyamo-mobile-cart-dock,
  html body.piyamo-mobile-shop-ui-active .piyamo-mobile-cart-dock,
  html body.piyamo-mobile-store-chrome .piyamo-mobile-cart-dock,
  html body.single-product .piyamo-mobile-cart-dock,
  html body.woocommerce-cart .piyamo-mobile-cart-dock,
  html body.woocommerce-checkout .piyamo-mobile-cart-dock,
  html body.woocommerce-account .piyamo-mobile-cart-dock {
    display:block !important;
    position:fixed !important;
    top:auto !important;
    right:6px !important;
    bottom:calc(6px + env(safe-area-inset-bottom,0px)) !important;
    left:6px !important;
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:6px 7px !important;
    z-index:980 !important;
    box-sizing:border-box !important;
    border:1px solid rgba(201,168,124,.24) !important;
    border-radius:20px !important;
    background:linear-gradient(130deg,rgba(250,244,249,.96),rgba(239,226,235,.96)) !important;
    -webkit-backdrop-filter:blur(20px) saturate(145%) !important;
    backdrop-filter:blur(20px) saturate(145%) !important;
    box-shadow:0 8px 24px rgba(60,47,58,.12),inset 0 1px rgba(255,255,255,.82) !important;
    visibility:visible !important;
    opacity:1 !important;
    transform:none !important;
    pointer-events:auto !important;
  }
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-handle { display:none !important; }
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-dock-inner {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    min-height:49px !important;
    padding:0 !important;
    box-sizing:border-box !important;
  }
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-summary,
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-copy { min-width:0 !important; }
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-message {
    font-size:10px !important;
    font-weight:650 !important;
    line-height:1.25 !important;
  }
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-button {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 auto !important;
    min-height:43px !important;
    max-width:48% !important;
    padding:0 11px !important;
    box-sizing:border-box !important;
    border:0 !important;
    border-radius:13px !important;
    background:#634565 !important;
    color:white !important;
    font-size:10px !important;
    font-weight:700 !important;
    white-space:nowrap !important;
  }

  /* One consistent small purple arrow, separated from the treasure dock. */
  html body #piyamoGlobalScrollTop,
  html body .piyamo-global-scroll-top,
  html body.single-product .piyamo-global-scroll-top,
  html body.woocommerce-shop .piyamo-global-scroll-top,
  html body.woocommerce-cart .piyamo-global-scroll-top,
  html body.woocommerce-checkout .piyamo-global-scroll-top,
  html body.woocommerce-account .piyamo-global-scroll-top,
  html body.piyamo-mobile-store-chrome .piyamo-global-scroll-top {
    position:fixed !important;
    top:auto !important;
    right:14px !important;
    bottom:calc(91px + env(safe-area-inset-bottom,0px)) !important;
    left:auto !important;
    z-index:981 !important;
    display:inline-flex !important;
    justify-content:center !important;
    align-items:center !important;
    width:43px !important;
    height:43px !important;
    min-width:43px !important;
    min-height:43px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:50% !important;
    background:#634565 !important;
    color:#fff !important;
    box-shadow:0 8px 22px rgba(60,47,58,.20) !important;
    opacity:0 !important;
    transform:translateY(10px) !important;
    pointer-events:none !important;
  }
  html body #piyamoGlobalScrollTop.is-visible,
  html body .piyamo-global-scroll-top.is-visible,
  html body.single-product .piyamo-global-scroll-top.is-visible,
  html body.woocommerce-cart .piyamo-global-scroll-top.is-visible,
  html body.woocommerce-checkout .piyamo-global-scroll-top.is-visible,
  html body.woocommerce-account .piyamo-global-scroll-top.is-visible,
  html body.piyamo-mobile-store-chrome .piyamo-global-scroll-top.is-visible {
    opacity:1 !important;
    transform:translateY(0) !important;
    pointer-events:auto !important;
  }
  html body .piyamo-global-scroll-top svg {display:block !important;stroke:#fff !important;}

  /* Retain the keyboard safeguard on all screens, never hide when footer appears. */
  html body.piyamo-mobile-typing .piyamo-mobile-cart-dock,
  html body.piyamo-keyboard-open .piyamo-mobile-cart-dock,
  html body.piyamo-webview-keyboard-open .piyamo-mobile-cart-dock,
  html body.piyamo-mobile-typing #piyamoGlobalScrollTop,
  html body.piyamo-keyboard-open #piyamoGlobalScrollTop,
  html body.piyamo-webview-keyboard-open #piyamoGlobalScrollTop,
  html body.piyamo-mobile-typing .piyamo-global-scroll-top,
  html body.piyamo-keyboard-open .piyamo-global-scroll-top,
  html body.piyamo-webview-keyboard-open .piyamo-global-scroll-top {
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
}
@media (max-width:355px) {
  html body .piyamo-mobile-cart-dock .piyamo-mobile-cart-button {
    font-size:9px !important;
    padding:0 8px !important;
  }
}
@media (prefers-reduced-motion:reduce) {
  .piyamo-mobile-cart-dock,.piyamo-global-scroll-top { transition:none !important; }
}
