/* ==========================================================================
   Corporate Projukti — Redesign :: Products
   Product-grid layout only. The filter rail and empty state are shared
   components and live in system.css.
   ========================================================================== */

/* ---- Product grid ------------------------------------------------------
   24 active products divide evenly into a 4-column grid.
   ------------------------------------------------------------------------ */

.rd-slab-products {
    grid-template-columns: repeat(4, 1fr);
    --glow-size: 270px;
    --corner-size: 40px;
}

.rd-slab-products .rd-cell { padding: 0; }

/* The shot sits on a fixed ratio so a mixed bag of logos, boxes and
   screenshots still produces an even grid. */
.rd-product-shot {
    position: relative;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    padding: var(--sp-6);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    /* background: var(--surface-2); */
}

.rd-product-shot img {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    object-fit: contain;
    transition: opacity var(--t);
}

.rd-cell:hover .rd-product-shot img { opacity: .92; }

.rd-product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--sp-6);
}

.rd-product-name {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.34;
    letter-spacing: var(--track-head);
    color: var(--tx-1);

    /* Clamp at two lines and always reserve both, so a name that wraps
       does not make its row taller than the rest of the grid. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.68em;
}

.rd-product-blurb {
    margin-top: var(--sp-3);
    color: var(--tx-2);
    font-size: 13.6px;

    /* Blurb lengths vary a lot; cap so the grid stays even. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1080px) {
    .rd-slab-products { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
    .rd-slab-products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .rd-slab-products {
        grid-template-columns: 1fr;
        --glow-size: 220px;
        --corner-size: 32px;
    }
}
