/*
 * GD Card: shared width behaviour of cards (product item, crosslink, sector solution).
 * Depends on gd-colors.css for the --gd-card-width* tokens.
 *
 * Desired width --gd-card-width, never narrower than --gd-card-width-min, never wider
 * than --gd-card-width-max. On mobile cards take the full width.
 *
 * Two levels:
 *  1. The Elementor widget wrapper is the flex item in a row of single-card widgets, so
 *     it carries the sizing: equal basis and equal limits give equal widths. Cards grow
 *     up to the max. The row container needs "Wrap" enabled in Elementor for min-width
 *     and the mobile full width to work.
 *  2. The card itself fills its wrapper (or its grid cell) up to the max.
 *
 * The wrapper selector is deliberately specific: Elementor sets
 * `.elementor.elementor .e-con > .elementor-widget { max-width: 100% }`.
 */

.elementor.elementor .e-con > .elementor-widget.elementor-widget-immer_gd_product_card,
.elementor.elementor .e-con > .elementor-widget.elementor-widget-immer_gd_sector_solution_card,
.elementor.elementor .e-con > .elementor-widget.elementor-widget-immer_gd_crosslink {
    flex: 1 1 var(--gd-card-width);
    min-width: var(--gd-card-width-min);
    max-width: var(--gd-card-width-max);
}

.elementor-widget-immer_gd_product_card .elementor-widget-container,
.elementor-widget-immer_gd_sector_solution_card .elementor-widget-container,
.elementor-widget-immer_gd_crosslink .elementor-widget-container {
    display: flex;
    height: 100%;
}

.gd-product-item,
.gd-crosslink,
.gd-ss-card {
    width: 100%;
    max-width: var(--gd-card-width-max);
}

/* Mobile (Elementor's mobile breakpoint): full width */
@media (max-width: 767px) {
    .elementor.elementor .e-con > .elementor-widget.elementor-widget-immer_gd_product_card,
    .elementor.elementor .e-con > .elementor-widget.elementor-widget-immer_gd_sector_solution_card,
    .elementor.elementor .e-con > .elementor-widget.elementor-widget-immer_gd_crosslink {
        flex-basis: 100%;
        min-width: 0;
        max-width: none;
    }

    .gd-product-item,
    .gd-crosslink,
    .gd-ss-card {
        max-width: none;
    }
}
