/* Zernto mobile product page hard override v2.
   This file is intentionally loaded after the primary theme stylesheet. */
@media (max-width: 959px) {
  html,
  body[data-page-type="product"] {
    max-width: 100%;
    overflow-x: clip;
  }

  body[data-page-type="product"] theme-product-detail,
  body[data-page-type="product"] .product-detail__main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body[data-page-type="product"] .product-detail__main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    flex-direction: column !important;
    column-gap: 0 !important;
    row-gap: 12px !important;
  }

  body[data-page-type="product"] .product-detail__main > * {
    grid-column: 1 !important;
    flex: none !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body[data-page-type="product"] .zernto-product-brief {
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0 12px !important;
    padding: 13px 14px 12px !important;
  }

  body[data-page-type="product"] .zernto-product-brief p {
    font-size: 13px !important;
    line-height: 1.45 !important;
    -webkit-line-clamp: 3 !important;
  }

  body[data-page-type="product"] .zernto-product-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    padding: 4px !important;
    overflow: hidden !important;
  }

  body[data-page-type="product"] .zernto-product-nav button {
    display: flex !important;
    min-width: 0 !important;
    min-height: 50px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 3px 1px !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  body[data-page-type="product"] .zernto-product-nav button b {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 650 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-page-type="product"] .zernto-product-nav button:nth-child(3) b {
    font-size: 9px !important;
  }

  body[data-page-type="product"] .zernto-product-nav__more-prefix {
    display: none !important;
  }

  body[data-page-type="product"] .zernto-product-nav button .zernto-product-nav__icon {
    display: grid !important;
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
    place-items: center !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  /* Keep the reward milestones readable on narrow product pages. */
  body[data-page-type="product"] [data-zernto-product-progress-host] .zernto-progress__top {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  body[data-page-type="product"] [data-zernto-product-progress-host] .zernto-progress__reward {
    width: 100% !important;
    min-width: 0 !important;
    line-height: 1.25 !important;
  }

  body[data-page-type="product"] [data-zernto-product-progress-host] .zernto-progress__tiers {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
    align-items: start !important;
    font-size: 7.5px !important;
    line-height: 1.2 !important;
  }

  body[data-page-type="product"] [data-zernto-product-progress-host] .zernto-progress__tiers span {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
}
