/* Mobile layout — loaded on every storefront page */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  #loading-screen {
    inset: 12px !important;
    border-radius: 16px !important;
  }

  #loading-screen .fixed.bottom-20 {
    bottom: 24px !important;
    right: 16px !important;
    font-size: 2.25rem !important;
  }

  .mobile-menu-btn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  header nav.flex-1 {
    width: min(86vw, 320px);
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .nav-item.has-dropdown:hover .nav-dropdown {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .nav-item.has-dropdown.dropdown-open .nav-dropdown {
    position: static;
    transform: none !important;
    left: auto;
    width: 100%;
    min-width: 0;
    margin: 0 0 8px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #111;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-item.has-dropdown.dropdown-open .nav-dropdown a {
    color: #fff;
    white-space: normal;
  }

  .nav-item.has-dropdown.dropdown-open .nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .social-sidebar {
    top: auto;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    right: 0;
  }

  .social-sidebar a,
  .social-toggle-btn {
    width: 40px;
    height: 40px;
  }

  #zoomContainer {
    height: min(52vh, 380px) !important;
    min-height: 220px !important;
    max-height: 420px !important;
  }

  #thumbsContainer {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  #addToCartBtn {
    width: 100%;
    min-height: 48px;
  }

  .checkout-page h1,
  #checkoutForm h1,
  body.pt-20 h1.text-5xl {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem !important;
  }

  #checkoutForm > div,
  #cartContent > div {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .cart-item {
    grid-template-columns: 72px 1fr !important;
    gap: 12px !important;
  }

  .cart-item img {
    width: 72px !important;
    height: 72px !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
    max-width: 100%;
  }

  .coupon-row {
    flex-direction: column;
  }

  .coupon-row button {
    width: 100%;
  }
}

@media (hover: none) {
  #zoomContainer {
    cursor: pointer;
  }
}
