/* Site Toolkit: phone and tablet bottom menu. nav.… beats the theme's link and button rules without needing an id. */
.pdp-mobile-bottom-nav { display: none; }
.pdp-mobile-nav-price { display: none; }

@media (max-width: 1023px) {
  nav.pdp-mobile-bottom-nav {
    position: fixed;
    z-index: 997;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    box-sizing: border-box;
    width: auto;
    height: 76px;
    min-height: 76px;
    padding: 8px 8px 6px;
    gap: 0;
    border: 1px solid #e6e6e6;
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 5px 22px rgba(0, 0, 0, .1);
    overflow: visible;
  }
  body:has(.pdp-mobile-bottom-nav) { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0;
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    appearance: none;
    background: transparent;
    box-shadow: none;
    color: #858585;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    font-family: inherit;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
  }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-link[hidden] { display: none; }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-link > .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    min-height: 22px;
    line-height: 1;
  }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-link[aria-current] { color: #262626; }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-link:focus-visible {
    outline: 2px solid #262626;
    outline-offset: -2px;
    border-radius: 12px;
  }

  nav.pdp-mobile-bottom-nav .pdp-mobile-cart-fragment {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-width: 0;
    align-self: stretch;
  }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-cart { color: #262626; }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-cart[aria-disabled="true"] { color: #999; }
  nav.pdp-mobile-bottom-nav .pdp-cart-count {
    position: absolute;
    top: 4px;
    left: calc(50% + 8px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 14px;
    height: 14px;
    padding: 0 2px;
    border: 1px solid #dedede;
    border-radius: 99px;
    background: #fff;
    color: #262626;
    font-size: 8px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
  }
  nav.pdp-mobile-bottom-nav .pdp-cart-count[data-count="0"] { display: none; }
}

/* A product page on a phone: the middle item is the buy button and the price sits under it. */
@media (max-width: 767px) {
  body.pdp-mobile-nav-purchase-ready nav.pdp-mobile-bottom-nav { height: 84px; }
  body.pdp-mobile-nav-purchase-ready nav.pdp-mobile-bottom-nav .pdp-mobile-nav-link {
    padding-top: 0;
    padding-bottom: 16px;
  }
  body.pdp-mobile-nav-purchase-ready nav.pdp-mobile-bottom-nav .pdp-mobile-nav-price {
    position: absolute;
    bottom: 2px;
    left: 50%;
    display: block;
    width: max-content;
    max-width: 100%;
    color: #262626;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
  }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-price .price { margin: 0; font: inherit; }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-price del { display: none; }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-price ins { text-decoration: none; }
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-price .woocommerce-Price-amount { font: inherit; }
}

/* From 992px the page header shows its own menu. */
@media (min-width: 992px) and (max-width: 1023px) {
  nav.pdp-mobile-bottom-nav .pdp-mobile-nav-menu { display: none; }
}

/* custom picture icons: masked to the text colour, or the picture as it is */
nav.pdp-mobile-bottom-nav .icon--mask, .stk-nav-preview .icon--mask { display: inline-block; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--stk-nav-icon) center / contain no-repeat; mask: var(--stk-nav-icon) center / contain no-repeat; }
nav.pdp-mobile-bottom-nav .icon--img img { display: block; width: 22px; height: 22px; object-fit: contain; }
