
/*
 * Pro Mobile Theme Enhancer
 * Generic mobile compatibility layer for WordPress themes.
 */

@supports (-webkit-touch-callout: none) {
  html {
    -webkit-text-size-adjust: 100%;
  }
}

@media (max-width: 767px) {
  html {
    font-size: calc(16px * var(--pmt-font-scale, 1));
    scroll-behavior: smooth;
  }

  body.pmt-enabled {
    min-width: 0;
    color: var(--pmt-text);
    background: var(--pmt-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  body.pmt-enabled *,
  body.pmt-enabled *::before,
  body.pmt-enabled *::after {
    box-sizing: border-box;
  }

  body.pmt-enabled img,
  body.pmt-enabled video,
  body.pmt-enabled iframe,
  body.pmt-enabled svg {
    max-width: 100%;
    height: auto;
  }

  body.pmt-enabled iframe {
    width: 100%;
  }

  body.pmt-enabled .site,
  body.pmt-enabled .site-content,
  body.pmt-enabled .content-area,
  body.pmt-enabled .container,
  body.pmt-enabled .wrapper,
  body.pmt-enabled main,
  body.pmt-enabled article {
    min-width: 0;
  }

  body.pmt-enabled .entry-content,
  body.pmt-enabled .page-content,
  body.pmt-enabled .site-main {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.pmt-enabled p,
  body.pmt-enabled li {
    line-height: 1.65;
  }

  body.pmt-enabled h1 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
    line-height: 1.12;
  }

  body.pmt-enabled h2 {
    font-size: clamp(1.5rem, 6vw, 1.95rem);
    line-height: 1.18;
  }

  body.pmt-enabled h3 {
    font-size: clamp(1.25rem, 5vw, 1.55rem);
    line-height: 1.25;
  }

  body.pmt-enabled button,
  body.pmt-enabled input[type="button"],
  body.pmt-enabled input[type="submit"],
  body.pmt-enabled .button,
  body.pmt-enabled .wp-element-button,
  body.pmt-enabled a.button {
    min-height: var(--pmt-button-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1rem;
    border-radius: var(--pmt-radius);
    touch-action: manipulation;
  }

  body.pmt-enabled input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
  body.pmt-enabled select,
  body.pmt-enabled textarea {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    font-size: 16px;
    border-radius: max(8px, calc(var(--pmt-radius) - 4px));
  }

  body.pmt-enabled textarea {
    min-height: 120px;
  }

  body.pmt-enabled table {
    max-width: 100%;
  }

  body.pmt-enabled .wp-block-table,
  body.pmt-enabled .woocommerce table.shop_table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.pmt-enabled pre,
  body.pmt-enabled code {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  body.pmt-enabled .wp-block-columns {
    gap: 1rem;
  }

  body.pmt-enabled .wp-block-cover,
  body.pmt-enabled .wp-block-group,
  body.pmt-enabled .wp-block-media-text {
    max-width: 100%;
  }

  body.pmt-enabled .alignwide,
  body.pmt-enabled .alignfull {
    max-width: 100vw;
  }

  body.pmt-enabled .navigation,
  body.pmt-enabled nav,
  body.pmt-enabled .menu,
  body.pmt-enabled .main-navigation {
    max-width: 100%;
  }

  body.pmt-enabled .menu-item > a,
  body.pmt-enabled .main-navigation a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  body.pmt-enabled .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  body.pmt-enabled .woocommerce ul.products::before,
  body.pmt-enabled .woocommerce ul.products::after {
    display: none !important;
  }

  body.pmt-enabled .woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    min-width: 0;
  }

  body.pmt-enabled .woocommerce ul.products li.product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--pmt-radius);
  }

  body.pmt-enabled .woocommerce div.product {
    max-width: 100%;
  }

  body.pmt-enabled .woocommerce div.product div.images,
  body.pmt-enabled .woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
  }

  body.pmt-enabled .woocommerce-cart table.cart .product-thumbnail {
    display: none;
  }

  body.pmt-enabled .woocommerce-checkout .col2-set .col-1,
  body.pmt-enabled .woocommerce-checkout .col2-set .col-2 {
    width: 100%;
    float: none;
  }

  body.pmt-enabled .woocommerce form .form-row-first,
  body.pmt-enabled .woocommerce form .form-row-last {
    width: 100%;
    float: none;
  }

  body.pmt-enabled .woocommerce .quantity .qty {
    min-width: 70px;
  }

  body.pmt-sticky-header header.site-header,
  body.pmt-sticky-header #masthead,
  body.pmt-sticky-header .site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: inherit;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body.pmt-safe-area {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  body.pmt-safe-area header.site-header,
  body.pmt-safe-area #masthead,
  body.pmt-safe-area .site-header {
    padding-top: max(0px, env(safe-area-inset-top));
  }

  body.pmt-safe-area footer,
  body.pmt-safe-area .site-footer {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  body.pmt-enabled .pmt-mobile-padding {
    padding-left: var(--pmt-pad) !important;
    padding-right: var(--pmt-pad) !important;
  }
}

@media (max-width: 480px) {
  body.pmt-enabled .woocommerce ul.products {
    gap: 10px;
  }

  body.pmt-enabled .woocommerce ul.products li.product .price,
  body.pmt-enabled .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: .95rem;
  }
}
