/* =========================================================
   Bert Products & Services v6.10
   Full 3:2 product flyer render, no cropping
   Primary green: #E11D2E
   ========================================================= */

/* Scope common wrapper names used by the Bert Products widget/section. */
.bert-products-grid,
.bert-products-services,
.bert-products-section,
.bert-products-v68,
.bert-products-v69,
.bert-products-v610,
.elementor-widget-bert-products-services-v68,
.elementor-widget-bert_products_services_v68,
.elementor-widget-bert-products-services-v69,
.elementor-widget-bert_products_services_v69 {
    --bert-primary: #E11D2E;
    --bert-product-ratio: 3 / 2;
}

/* Keep card wrappers clean but do not disturb the existing grid layout. */
.bert-products-grid .bert-product-card,
.bert-products-services .bert-product-card,
.bert-products-section .bert-product-card,
.bert-products-v68 .bert-product-card,
.bert-products-v69 .bert-product-card,
.bert-products-v610 .bert-product-card,
.elementor-widget-bert-products-services-v68 .bert-product-card,
.elementor-widget-bert_products_services_v68 .bert-product-card,
.elementor-widget-bert-products-services-v69 .bert-product-card,
.elementor-widget-bert_products_services_v69 .bert-product-card,
.bert-products-grid .bert-service-card,
.bert-products-services .bert-service-card,
.bert-products-section .bert-service-card,
.bert-products-grid .bert-product-item,
.bert-products-services .bert-product-item,
.bert-products-section .bert-product-item {
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

/* Image containers, both old and new class names. */
.bert-products-grid .bert-product-image-wrap,
.bert-products-services .bert-product-image-wrap,
.bert-products-section .bert-product-image-wrap,
.bert-products-v68 .bert-product-image-wrap,
.bert-products-v69 .bert-product-image-wrap,
.bert-products-v610 .bert-product-image-wrap,
.elementor-widget-bert-products-services-v68 .bert-product-image-wrap,
.elementor-widget-bert_products_services_v68 .bert-product-image-wrap,
.elementor-widget-bert-products-services-v69 .bert-product-image-wrap,
.elementor-widget-bert_products_services_v69 .bert-product-image-wrap,
.bert-products-grid .bert-product-image,
.bert-products-services .bert-product-image,
.bert-products-section .bert-product-image,
.bert-products-grid .bert-card-image,
.bert-products-services .bert-card-image,
.bert-products-section .bert-card-image,
.bert-products-grid .bert-service-image,
.bert-products-services .bert-service-image,
.bert-products-section .bert-service-image {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: var(--bert-product-ratio) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    background-color: #ffffff !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: contain !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* If the image container still has an inline background image, this prevents crop. */
.bert-products-grid [style*="background-image"],
.bert-products-services [style*="background-image"],
.bert-products-section [style*="background-image"],
.bert-products-v68 [style*="background-image"],
.bert-products-v69 [style*="background-image"],
.bert-products-v610 [style*="background-image"],
.elementor-widget-bert-products-services-v68 [style*="background-image"],
.elementor-widget-bert_products_services_v68 [style*="background-image"],
.elementor-widget-bert-products-services-v69 [style*="background-image"],
.elementor-widget-bert_products_services_v69 [style*="background-image"] {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: #ffffff !important;
}

/* Real image tags, including Elementor's nested image wrappers. */
.bert-products-grid .bert-product-image-wrap img,
.bert-products-services .bert-product-image-wrap img,
.bert-products-section .bert-product-image-wrap img,
.bert-products-v68 .bert-product-image-wrap img,
.bert-products-v69 .bert-product-image-wrap img,
.bert-products-v610 .bert-product-image-wrap img,
.elementor-widget-bert-products-services-v68 .bert-product-image-wrap img,
.elementor-widget-bert_products_services_v68 .bert-product-image-wrap img,
.elementor-widget-bert-products-services-v69 .bert-product-image-wrap img,
.elementor-widget-bert_products_services_v69 .bert-product-image-wrap img,
.bert-products-grid .bert-product-image img,
.bert-products-services .bert-product-image img,
.bert-products-section .bert-product-image img,
.bert-products-grid .bert-card-image img,
.bert-products-services .bert-card-image img,
.bert-products-section .bert-card-image img,
.bert-products-grid .bert-service-image img,
.bert-products-services .bert-service-image img,
.bert-products-section .bert-service-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    background: #ffffff !important;
}

/* Elementor wrapper corrections around Image widgets. */
.bert-products-grid .bert-product-image-wrap .elementor-widget-image,
.bert-products-services .bert-product-image-wrap .elementor-widget-image,
.bert-products-section .bert-product-image-wrap .elementor-widget-image,
.bert-products-grid .bert-product-image-wrap .elementor-widget-container,
.bert-products-services .bert-product-image-wrap .elementor-widget-container,
.bert-products-section .bert-product-image-wrap .elementor-widget-container,
.bert-products-grid .bert-product-image-wrap figure,
.bert-products-services .bert-product-image-wrap figure,
.bert-products-section .bert-product-image-wrap figure {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* Bottom overlay, kept aligned with the current design. */
.bert-products-grid .bert-product-title-bar,
.bert-products-services .bert-product-title-bar,
.bert-products-section .bert-product-title-bar,
.bert-products-v68 .bert-product-title-bar,
.bert-products-v69 .bert-product-title-bar,
.bert-products-v610 .bert-product-title-bar,
.elementor-widget-bert-products-services-v68 .bert-product-title-bar,
.elementor-widget-bert_products_services_v68 .bert-product-title-bar,
.elementor-widget-bert-products-services-v69 .bert-product-title-bar,
.elementor-widget-bert_products_services_v69 .bert-product-title-bar {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 5 !important;
    background: rgba(31, 161, 46, 0.82) !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 15px 20px !important;
    font-weight: 700 !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
}

@media (max-width: 1024px) {
    .bert-products-grid .bert-product-title-bar,
    .bert-products-services .bert-product-title-bar,
    .bert-products-section .bert-product-title-bar {
        font-size: 19px !important;
        padding: 13px 18px !important;
    }
}

@media (max-width: 767px) {
    .bert-products-grid .bert-product-title-bar,
    .bert-products-services .bert-product-title-bar,
    .bert-products-section .bert-product-title-bar {
        font-size: 17px !important;
        padding: 12px 15px !important;
    }
}
