@media (max-width: 760px) {
    html .site-header .header-main,
    html .site-header .header-main:has(.cart-mobile-link) {
        min-height: 0;
        grid-template-rows: 44px 44px;
        row-gap: 4px;
        padding-block: 4px;
    }
    .site-header .brand { width: min(100%, 252px); }
    .site-header .global-search, .site-header .cart-mobile-link { height: 44px; }
    .site-header .global-search input { font-size: 16px; }
    body:has(#mobile-menu.is-open) [data-site-chat-host] {
        visibility: hidden;
        pointer-events: none;
    }
}

@media (max-width: 1024px) and (max-height: 480px) {
    body:has(.product-page .product-tabs) .site-header { position: relative; }
}

@media (orientation: landscape) and (max-height: 480px) and (max-width: 1024px) {
    body:has(.cart-mobile-bar) .site-header { position: relative; }
    .cart-mobile-bar { position: static; }
}

/* Product sections remain visible above their contents, including long menus. */
.product-page .product-tabs {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 clamp(12px, 2vw, 30px);
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
}

.product-page .product-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    padding-block: 6px;
    overflow-wrap: anywhere;
}

html:has(.product-page .product-tabs) {
    scroll-padding-block-start: calc(var(--promelec-header-height, 180px) + 12px);
}

.product-page:has(.product-tabs) [id] {
    scroll-margin-block-start: 0;
}

@media (max-width: 640px) {
    html:has(.product-page .product-tabs) {
        scroll-padding-block-start: calc(var(--promelec-header-height, 121px) + 8px);
    }

    .product-page .spec-table > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
        padding: 9px 12px;
    }

    .product-page .spec-table > div > :is(dt, dd) {
        min-width: 0;
        margin: 0;
        padding: 0;
        overflow-wrap: anywhere;
    }
}

.products-list .category-product-excerpt {
  overflow-wrap: anywhere;
}

@media (max-width: 400px) {
  .products-list > .product-card:has(.category-product-excerpt) {
    grid-template-columns: minmax(0, 1fr);
  }

  .products-list > .product-card:has(.category-product-excerpt) > .product-card__image {
    justify-self: center;
    width: min(120px, 100%);
  }
}
@media (max-width: 360px) {
  .page-intro h1,
  .article-header h1 {
    font-size: clamp(28px, 9vw, 32px);
    hyphens: auto;
    text-wrap: balance;
  }
}

