/* =====================================================================
   Collab Room  (shortcode: [collab-room])
   Left  = auto-fading image slideshow with centered title overlay.
   Right = framed checkerboard grid of image / text boxes.
   Scoped under .cr-root — safe to load site-wide & cached.
   Per-instance values via CSS custom properties set inline:
     --cr-cols  (right grid columns on desktop)
   ===================================================================== */

.cr-root {
    --cr-cols: 3;
    --cr-line: #e6e6e6;       /* grid / frame line colour */
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 1295px;
    height: 425px;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
    align-items: stretch;
    background: #fff;
    /* Full-width white band so the page background pattern is hidden behind
       this section (the element is max-width 1295px and centered). The vertical
       inset (-41px) also covers the 40px top/bottom margins so no page
       background shows above/below the section. */
    box-shadow: 0 0 0 100vmax #fff;
    clip-path: inset(-41px -100vmax);
}

/* ── Left: slideshow ── */
.cr-left {
    flex: 0 0 48%;
    max-width: 48%;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
}

.cr-slides {
    position: absolute;
    inset: 0;
}

.cr-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.cr-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.cr-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cr-left-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.18) 100%);
}

.cr-title {
    color: #fff;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(26px, 3vw, 46px);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.05;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* ── Right: framed grid ──
   Thin grid lines are produced by a 1px gap over a line-coloured
   background; the outer border frames every box together. */
.cr-right {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(var(--cr-cols), 1fr);
    grid-auto-rows: 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    overflow: hidden;
    box-sizing: border-box;
}

.cr-cell {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    min-height: 0;
}

/* Image box — product shot on clean white (matches the card background) */
.cr-cell-image {
    background: #fff;
    padding: 18px;
}

.cr-cell-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.cr-cell-image:hover img {
    transform: scale(1.05);
}

/* Text box */
.cr-cell-text {
    background: #fff;
    flex-direction: column;
    text-align: center;
    padding: 18px 22px;
}

.cr-cell-title {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(15px, 1.1vw, 19px);
    color: #111;
    line-height: 1.25;
    margin: 0 0 8px;
}

.cr-cell-desc {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(12px, 0.9vw, 14px);
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* Combo box — image on top, text below (used when a cell has BOTH) */
.cr-cell-combo {
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.cr-combo-img {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f1f1f1;
    box-sizing: border-box;
    overflow: hidden;
}

.cr-combo-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.cr-cell-combo:hover .cr-combo-img img {
    transform: scale(1.05);
}

.cr-combo-text {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 14px 18px;
    background: #fff;
    box-sizing: border-box;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .cr-cell-text {
        padding: 14px 14px;
    }
}

@media (max-width: 992px) {
    /* Stack: slideshow on top, grid below */
    .cr-root {
        flex-direction: column;
        height: auto;
    }
    .cr-left {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        height: 340px;
    }
    .cr-right {
        width: 100%;
        height: auto;
        grid-auto-rows: minmax(190px, auto);
    }
}

@media (max-width: 600px) {
    .cr-root {
        --cr-cols: 2;
        padding: 0 12px;
        margin: 28px auto;
    }
    .cr-left {
        height: 260px;
    }
    .cr-right {
        grid-auto-rows: minmax(170px, auto);
    }
    .cr-cell-text {
        padding: 12px 10px;
    }
}
