/* ==========================================================================
   Product line pages - the category pages with the structure of the
   Flowmeters design (render: reference/pages/Assortiment_Flowmeters.png).
   Seeds: scripts/content-2026/lib/product-line.php. The rules hook on the
   CSS classes of the sections: line-hero, line-text, line-split,
   line-block (layout config_panels) and line-docs.
   ========================================================================== */

/* Hero stage: the product image on the light-blue shape, as on Flowmeters.
   The prototype tiles have this blue baked in. */
.line-hero .product-stage {
    --stage-bg: var(--color-blue-10);
}

.line-hero .product-stage img {
    width: 70%;
}

/* Product images on a white background: "multiply" shows the colour of
   the shape instead of the white, so the shape keeps its form (designer
   feedback of 3 November). The panels and the split blocks always get it:
   their images are product photos on white. A hero gets it only with
   "line-blend": the prototype tiles have the blue baked in, and two blues
   multiply to a darker box. The 2 px inset clips the grey edge row that
   the client photos carry, which multiplied to a line above and below the
   product. */
.line-blend .product-stage img,
.line-block .config-panel__media img {
    mix-blend-mode: multiply;
    clip-path: inset(2px);
}

/* A variant block follows the intro of its series closely. */
.line-block.line-variant {
    padding-top: calc(var(--section-y) * 0.25);
}

/* The hero intro (layout intro with a product image) keeps the left edge
   of the text blocks. */
.line-hero .section-intro--start {
    max-width: var(--measure);
    margin-inline: auto;
}

/* A text block without an image is centred, as "Flowmeters Flow-Meter" in
   the design: left-aligned copy belongs to a block with an image next to
   it or to two columns (designer feedback of 3 November). Lists stay
   left-aligned inside the centred column, as a centred bullet list is
   hard to read. */
.line-text .section-intro--start,
.line-text .measure {
    max-width: var(--measure);
    margin-inline: auto;
    text-align: center;
}

.line-text .section-intro--start .btn-row {
    justify-content: center;
}

.line-text :is(ul, ol) {
    display: inline-block;
    text-align: left;
}

/* Same gaps as the Flowmeters blocks: each section ends with the default
   88 px, the next block starts closer. */
.line-text,
.line-split {
    padding-top: calc(var(--section-y) * 0.45);
}

.line-block {
    padding-top: calc(var(--section-y) * 0.43);
}

/* The documentation block stands one section gap below the block above
   it, the same gap as between this block and "Contact". The block above
   ends with that gap already, so the block adds no gap of its own. */
.line-docs {
    padding-top: 0;
}

/* Sub-lines (for example MediFlow II and MediFlow Ultra II) in two text
   columns under the intro of the block. */
.line-block .config-lines {
    display: grid;
    gap: var(--space-6);
    margin-block: var(--space-8) var(--space-9);
}

@media (min-width: 768px) {
    .line-block .config-lines {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--space-9);
    }
}

/* One sub-line alone (for example "De bleed-functie bij lage flows" on
   Mixers) is centred like the intro of its block. One line in the first
   of two columns reads as a block with a missing neighbour. */
.line-block .config-lines:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: var(--measure);
    margin-inline: auto;
    text-align: center;
}

/* Two or more panels in one block stack with a gap. */
.line-block .config-panel + .config-panel {
    margin-top: var(--space-6);
}

/* A product image in a text block (layout split, for example
   Positioneringskussens) stands on the exact blue of the prototype tiles,
   so the tile edge never shows in the shape. The image sits at the top of
   the text instead of halfway a long column, as in the design (designer
   feedback of 3 November). This mirrors .split--top: the seed emits only
   the "reverse" variant, and a class change in the seed needs a content
   re-run on every environment, so the page CSS carries the alignment. */
.line-split .product-stage {
    --stage-bg: var(--color-blue-tile);
}

.line-split .split {
    align-items: start;
}

/* On a phone the label column of a table is narrow. Long Dutch labels
   ("Vacuümkracht", "Overloopbeveiliging") hyphenate at a syllable instead
   of breaking at any letter. */
@media (max-width: 767.98px) {
    .line-block .config-panel__body .spec-table th {
        hyphens: auto;
        overflow-wrap: break-word;
    }
}
