/*
 * MagForest catalogue card width repair — sitewide edition.
 *
 * The Helium/EDD catalogue can allow the lower information/action panel to
 * occupy the full grid column while the cover image remains at its intrinsic
 * rendered width. This becomes especially visible on wide desktop layouts.
 *
 * These rules apply only inside MagForest EDD catalogue grids and therefore
 * cover the homepage, categories, tags, search/archive pages, publisher
 * catalogues and MFIS-appended catalogue cards without changing single-item
 * page layouts.
 */

body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .grid-inner,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd-download-info-wrap {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* Force the visual cover area to use the full width of its own grid card. */
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .grid-inner > a,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid picture.grid-list-image,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid picture.grid-list-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid picture.grid-list-image img {
    height: auto !important;
}

/* Keep the title/action footer inside exactly the same card boundary. */
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd-download-info-wrap {
    width: 100% !important;
    overflow: hidden;
}

body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd-download-info,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd-download-actions,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd_download_purchase_form,
body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd_purchase_submit_wrapper {
    box-sizing: border-box !important;
}

body.mf-card-width-fix .edd-download-grid .grid-list-wrap > article.grid .edd-download-actions {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/*
 * MFIS appends the same article.grid structure after page load. Because these
 * selectors are structural CSS rather than one-time JavaScript, newly appended
 * cards inherit the repair automatically.
 */
