/* Responsive presentation fixes for Eternal Peptides Wholesale research pages only. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

main img,
main video,
main iframe,
main svg {
  max-width: 100%;
  height: auto;
}

main table {
  max-width: 100%;
}

@media (max-width: 767px) {
  header > div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  header img {
    width: 3.2rem !important;
    height: 2rem !important;
    object-fit: contain;
    flex: 0 0 auto;
  }

  header a.flex.items-center {
    gap: 0.65rem !important;
    min-width: 0;
  }

  header .font-bold.text-lg {
    font-size: 1rem !important;
    line-height: 1.15 !important;
    white-space: normal; /* 2026-11-03: was nowrap; wordmark overlapped cart icon at 360px */
  }

  header .text-xs {
    font-size: 0.72rem !important;
  }

  header nav.md\:hidden {
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    padding: 0.6rem 0.25rem !important;
    font-size: 0.8rem !important;
  }

  main > section:first-child {
    padding: 2.25rem 1rem !important;
  }

  main > section:first-child > div:nth-child(2) {
    width: 100% !important;
    max-width: 100% !important;
  }

  main > section:first-child > div:nth-child(2) > div:first-child {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
    line-height: 1.5 !important;
    padding: 0.45rem 0.75rem !important;
  }

  main > section:first-child h1 {
    font-size: clamp(1.85rem, 9vw, 2.35rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
  }

  main > section:first-child p {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
  }

  main > section:first-child a {
    width: 100% !important;
    max-width: 22rem;
    text-align: center;
  }

  main > div[style*="max-width"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  main h2 {
    font-size: 1.45rem !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
  }

  main h3,
  main p,
  main li,
  main a,
  main strong,
  main span,
  main div {
    overflow-wrap: anywhere;
  }

  /* 2026-11-03: keep table header words whole (e.g. "Presentation") */
  main table th {
    overflow-wrap: normal;
  }

  main div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main div[style*="border-radius:16px"] {
    padding: 1.35rem !important;
  }

  main div[style*="font-size:2rem"] {
    font-size: 1.65rem !important;
  }

  main div[style*="justify-content:space-between"] > a,
  main form button {
    width: 100% !important;
    white-space: normal !important;
    text-align: center;
  }

  main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
  }

  main > div:first-child .flex.items-center.gap-2.text-sm {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    line-height: 1.45 !important;
  }

  main > div:first-child .flex.items-center.gap-2.text-sm > span:last-child {
    flex-basis: 100%;
  }

  main article > div {
    padding: 1.25rem !important;
  }

  main article h1 {
    font-size: 1.85rem !important;
    line-height: 1.15 !important;
  }

  main article > div > p.text-lg {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }

  main article .flex.flex-wrap.items-center.gap-3 {
    gap: 0.55rem !important;
  }

  main article a.inline-block {
    max-width: 100%;
    white-space: normal !important;
    text-align: center;
  }

  main pre,
  main code {
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
  }
}
