/* BJF mobile fixes — 2026-10-29
 * 1. Horizontal scroll wrapper for content tables that are wider than the screen
 *    (wrapper is added by assets/js/bjf-mobile-fixes.js).
 * 2. Footer copyright line was white-space:nowrap and got cut off on phones.
 * 3. Full-bleed footer blocks used -48px margins while the footer has 20px padding on phones.
 * 4. Fixed-width embeds (YouTube iframes with width="800") capped to the screen width.
 * 5. WooCommerce product grid: one column on phones (two 128px columns cut product titles off).
 * Note: footer.php passes its inline CSS through make_style_important(), so the footer
 * overrides below must be !important and more specific than the single-class rules there.
 */
.bjf-tscroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 0 0 1.2em;
}
.bjf-tscroll > table {
    margin-bottom: 0;
}

@media (max-width: 680px) {
    footer .footer-middle .footer-copy-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    footer .footer-middle .footer-copy {
        white-space: normal !important;
        line-height: 1.6 !important;
    }
    footer .footer-legal,
    footer .footer-trademark {
        margin-left: -20px !important;
        margin-right: -20px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .entry-content iframe[width],
    .raw-page-data iframe[width],
    .woocommerce-Tabs-panel iframe[width],
    .woocommerce-product-details__short-description iframe[width],
    .single-product .summary iframe[width] {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products li.product.shop-item {
        width: 100% !important;
        float: none !important;
    }
}

/* Containers collapsed by bjf-mobile-fixes.js on phones */
.bjf-grid-fixed,
.bjf-flex-fixed {
    overflow-wrap: anywhere;
}
.bjf-grid-fixed > * {
    min-width: 0;
}

@media (max-width: 680px) {
    /* Images inside page/product content never wider than the screen; long product names may break */
    .raw-page-data img,
    .entry-content img,
    .woocommerce-Tabs-panel img,
    .sp-tab__tab-pane img {
        max-width: 100%;
        height: auto;
    }
    .single-product h1.product_title,
    .single-product .product_title {
        overflow-wrap: anywhere;
    }
}
