/* ==========================================================
   JT MAISON — Collaborations Widget
   ========================================================== */

.jtm-collabs {
    width: 100%;
    padding: 100px 0px;
    background: var(--jtm-white);
    box-sizing: border-box;
}

.jtm-collabs__inner {
    margin: 0 auto;
}

.jtm-collabs__title {
    font-family: var(--jtm-font-ui);
    font-size: 32px;
    font-weight: 500;
    color: var(--jtm-dark);
    margin: 0 0 40px 0;
}

/* Global 2-Row Horizontal Scroll Container */
.jtm-collabs__scroll-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 20px;
}

.jtm-collabs__scroll-container::-webkit-scrollbar {
    display: none;
}

.jtm-collabs__row {
    display: flex;
    gap: 4px;
    width: max-content; /* Essential for mobile horizontal scroll */
    min-width: 100%;
}

/* Staggered effect for desktop: 
   We use justify-content to dynamically align rows to margins.
   Top row aligns right, bottom row aligns left. */
.jtm-collabs__row--top {
    width: 100%;
    margin-bottom: 4px;
    justify-content: flex-end;
    padding-left: 0;
    padding-right: 0;
}

.jtm-collabs__row--bottom {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
    padding-right: 0;
}

.jtm-collabs__item {
    background: #F7F7F7;
    width: 180px; /* Reduced slightly to allow room for stagger padding */
    height: 150px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    scroll-snap-align: start;
    transition: background 0.3s ease;
    box-sizing: border-box;
}

.jtm-collabs__item:hover {
    background: #EEEEEE;
}

.jtm-collabs__item img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .jtm-collabs {
        padding: 60px 0 60px 24px;
    }
    
    .jtm-collabs__title {
        font-size: 24px;
        text-align: center;
        width: 100%;
        padding-right: 24px; /* Title needs this to center correctly relative to screen, since container has left padding */
        margin: 0;
    }
    
    .jtm-collabs__scroll-container {
        padding-right: 24px; /* Breathing room on the right */
    }

    .jtm-collabs__item {
        width: 150px;
        height: 130px;
        padding: 10px;
    }

    .jtm-collabs__row--top {
        width: max-content;
        justify-content: flex-start;
        padding-left: 60px; /* Stagger amount on mobile */
        padding-right: 0;
    }
    
    .jtm-collabs__row--bottom {
        width: max-content;
        justify-content: flex-start;
        padding-left: 0;
        padding-right: 60px; /* Match stagger width on other side */
    }
}
