/* ============================================================
   PRODUCT PAGE BLOCKS (inc/product-blocks.php)
   Image & Text Section + Product Downloads
   ============================================================ */

/* ── Image & Text Section ── */
.afw-it {
    width: 100%;
    background: #fff;
}

.afw-it--off-white {
    background: #F8FAFF;
}

.afw-it .afw-it-row {
    margin: 0 !important;
}

/* Sit flush: no WPBakery column padding (35px after a row with a background,
   e.g. the banner) or image margin around the section, so there are no white strips */
.vc_column-inner:has(.afw-it) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.afw-it .wpb_single_image {
    margin-bottom: 0 !important;
}

/* Text column spacing (desktop; the theme handles <992px via .box-gap).
   Descendant selectors so it also applies inside the WPBakery front-end editor. */
@media (min-width: 992px) {
    .afw-it--img-left .afw-it-row .box-gap .vc_column-inner {
        padding: 50px 12% 50px 5% !important;
    }

    .afw-it--img-right .afw-it-row .box-gap .vc_column-inner {
        padding: 50px 8% 50px 15% !important;
    }
}

/* Wide screens: line the text up with the site container (1320px) */
@media (min-width: 1400px) {
    .afw-it--img-left .afw-it-row .box-gap .vc_column-inner {
        padding-left: 6% !important;
        padding-right: max(8%, calc(50vw - 660px)) !important;
    }

    .afw-it--img-right .afw-it-row .box-gap .vc_column-inner {
        padding-left: max(8%, calc(50vw - 660px)) !important;
        padding-right: 6% !important;
    }
}

.afw-it .afw-it-heading {
    font-size: 40px;
    line-height: 48.72px;
    font-weight: 400;
    color: #232F3E;
    text-align: left;
    margin: 0 0 20px;
}

.afw-it h3.afw-it-heading {
    font-size: 30px;
    line-height: 1.25;
}

.afw-it .afw-it-text {
    margin-bottom: 0;
}

.afw-it .afw-it-text ul {
    margin: 0 0 16px;
}

.afw-it .afw-it-text ul li {
    margin-bottom: 10px;
}

.afw-it .afw-it-text ul li:before {
    top: 4px;
}

.afw-it .afw-it-text > .wpb_wrapper > *:last-child {
    margin-bottom: 0;
}

.afw-it .afw-it-btn {
    margin-top: 28px;
}

.afw-it a.afw-it-button {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 6px;
    background: #E34B11;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.afw-it a.afw-it-button:hover,
.afw-it a.afw-it-button:focus {
    background: #464646;
    color: #f7f7f7;
}

/* ── Product Downloads ── */
/* Sized by the block itself (site container width), so it looks the same in a
   full-width row on Pages (whose content column is narrow) and on Products */
.afw-product-downloads {
    box-sizing: border-box;
    width: 100%;
    max-width: 1350px; /* 1320px container + 15px padding each side */
    margin: 0 auto;
    padding: 60px 15px;
}

.afw-product-downloads .afw-pd-title {
    font-size: 40px;
    line-height: 48.72px;
    font-weight: 400;
    color: #232F3E;
    margin: 0 0 24px;
}

.afw-product-downloads .afw-pd-list {
    border-top: 1px solid #E1E4ED;
}

.afw-product-downloads .afw-pd-view-all {
    margin: 20px 0 0;
}

.afw-product-downloads .afw-pd-view-all a {
    color: #E9561F;
    font-weight: 600;
    text-decoration: none;
}

.afw-product-downloads .afw-pd-view-all a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .afw-it .afw-it-heading,
    .afw-product-downloads .afw-pd-title {
        font-size: 31px;
        line-height: 1.2;
    }

    .afw-product-downloads {
        padding: 40px 16px;
    }

    .afw-it .afw-it-btn {
        text-align: center;
    }
}

/* Image focus (block setting): which part of the photo stays in view when it is trimmed */
.afw-it--focus-top .afw-it-row img { object-position: center top !important; }
.afw-it--focus-bottom .afw-it-row img { object-position: center bottom !important; }
.afw-it--focus-left .afw-it-row img { object-position: left center !important; }
.afw-it--focus-right .afw-it-row img { object-position: right center !important; }

/* Tablet / small laptop (side by side, no 520px cap): the image fills its column so a
   landscape photo never leaves bands above and below it when the text is taller */
@media (min-width: 768px) and (max-width: 1199px) {
    .afw-it .afw-it-row > .vc_column_container:has(.wpb_single_image) > .vc_column-inner {
        position: relative;
        min-height: 360px;
    }

    .afw-it .afw-it-row > .vc_column_container:has(.wpb_single_image) .wpb_single_image {
        position: absolute;
        inset: 0;
        margin: 0 !important;
    }

    .afw-it .afw-it-row .wpb_single_image .wpb_wrapper,
    .afw-it .afw-it-row .wpb_single_image .vc_figure,
    .afw-it .afw-it-row .wpb_single_image .vc_single_image-wrapper,
    .afw-it .afw-it-row .wpb_single_image img {
        display: block;
        width: 100% !important;
        height: 100% !important;
    }

    .afw-it .afw-it-row .wpb_single_image img {
        object-fit: cover;
        max-width: none;
    }
}

/* Hide a Product Downloads row when no files are chosen (no blank gap) */
.vc_row:has(.afw-pd-empty) { display: none !important; }

/* Partner logo above the intro heading on uPVC product pages */
.eurocell-logo img { width: 170px; height: auto; display: block; }
