/* Align the visible marks, keeping the original artwork and its proportions.
   Automotive's main mark occupies y=3..192 in the 1292x332 SVG viewBox. */
body.category-page[data-area="werkzeuge"] .tools-brands{--gedore-height:20px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:18px;row-gap:22px;align-items:start;padding-block:24px}
body.category-page[data-area="werkzeuge"] .tools-brands>span{grid-column:1/-1;width:100%;margin:0;text-align:center}
body.category-page[data-area="werkzeuge"] .tools-brands .ag-brand{width:100%;grid-template-rows:60px auto;gap:10px;align-self:start}
body.category-page[data-area="werkzeuge"] .tools-brands .ag-brand>span:last-child{min-height:54px;line-height:18px;overflow-wrap:normal}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art{display:block;position:relative;width:100%;height:60px;min-height:0;background:#fff}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art>img{position:absolute;left:50%;top:25px;transform:translate(-50%,-50%);height:auto;max-width:100%;object-fit:contain;background:transparent}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art--gedore>img{width:calc(var(--gedore-height)*6.74074074);height:var(--gedore-height);top:calc(25px - var(--gedore-height)/2);transform:translateX(-50%)}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art--automotive>img{width:calc(var(--gedore-height)*6.8);height:calc(var(--gedore-height)*1.74736842);top:calc(25px - var(--gedore-height)*.51578947);transform:translateX(-50%)}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art--ochsenkopf>img{width:144px}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art--bohrcraft>img{width:80px}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art--flott>img{width:104px}
body.category-page[data-area="werkzeuge"] .tools-brands .tools-brand-art .ag-brand-logo--bgs{position:absolute;left:50%;top:25px;transform:translate(-50%,-50%);width:min(106px,100%);height:auto;aspect-ratio:404/183}
@media(min-width:901px) and (max-width:1120px){body.category-page[data-area="werkzeuge"] .tools-brands{--gedore-height:16px}}
@media(max-width:900px){body.category-page[data-area="werkzeuge"] .tools-brands{grid-template-columns:repeat(3,minmax(0,1fr))}body.category-page[data-area="werkzeuge"] .tools-brands .ag-brand:last-child{grid-column:1/-1;justify-self:center;width:calc((100% - 36px)/3)}}
@media(max-width:600px){body.category-page[data-area="werkzeuge"] .tools-brands{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px}body.category-page[data-area="werkzeuge"] .tools-brands .ag-brand:last-child{width:calc((100% - 22px)/2)}}
@media(max-width:360px){body.category-page[data-area="werkzeuge"] .tools-brands{--gedore-height:18px}}

/* Equal closed portfolio cards; disclosures retain natural expansion. */
body.category-page .tools-portfolio .ag-grid{align-items:stretch}
body.category-page .tools-portfolio .ag-card{display:flex;flex-direction:column}
body.category-page .tools-portfolio .ag-card-picture{flex-shrink:0}
body.category-page .tools-portfolio .ag-card-copy{display:flex;flex-direction:column;flex:1}
body.category-page .tools-portfolio .ag-brand-tags{margin-bottom:24px}
body.category-page .tools-portfolio .tile-promos{margin-top:0;margin-bottom:24px}
body.category-page .tools-portfolio .ag-choice{margin-top:auto}
@media(min-width:601px){body.category-page .tools-portfolio .ag-grid:not(:has(details[open])){grid-auto-rows:1fr}}

/* Shared caption rhythm: clear separation from portfolio cards. */
body.category-page .tools-portfolio>.portfolio-image-note{margin:24px 0 0;max-width:88ch;font-size:12px;line-height:1.65;color:#777}
@media(max-width:600px){body.category-page .tools-portfolio>.portfolio-image-note{margin-top:20px}}

/* Preserve the approved BGS photo crop and the earlier electrical-section anchor. */
body.category-page .tools-portfolio #bgs-technic .ag-card-picture img{object-position:center 80%}
body.category-page .tools-portfolio .tools-anchor-alias{display:block;height:0;scroll-margin-top:100px}

/* Full image wells, original photo proportions, no decorative borders. */
body.category-page .tools-portfolio .ag-card-picture img{width:100%;height:100%;object-fit:cover}
body.category-page .tools-portfolio #bohren-bearbeiten .ag-card-picture img{object-position:center 49%}
body.category-page .tools-portfolio #maschinen .ag-card-picture img{object-position:51% center}
/* Preserve complete machine silhouettes on narrow phones; all tile images match. */
@media(max-width:380px){body.category-page .tools-portfolio .ag-card-picture{height:170px}}

/* Closer FLOTT framing: 10% on wide cards; restrained crop on narrow cards. */
body.category-page .tools-portfolio #maschinen .ag-card-picture{container-type:inline-size;overflow:hidden}
body.category-page .tools-portfolio #maschinen .ag-card-picture img{transform:scale(1.02);transform-origin:50% 58%}
@container(min-width:380px){body.category-page .tools-portfolio #maschinen .ag-card-picture img{transform:scale(1.10)}}
