/* static/css/slit_module.css */

#fluid-slit-container {
    width: 70%;
    max-width: 1400px;
    margin: 60px auto;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    user-select: none;
}

@media (max-width: 768px) {
    #fluid-slit-container {
        width: 95%;
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-item {
    position: relative;
    background: #f4f4f4;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border: 2px solid transparent; 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.4s ease,
                border-color 0.3s ease;
}

.grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    z-index: 5;
}

.grid-item.is-active {
    border-color: #000;
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    z-index: 6;
}

.img-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    will-change: opacity;
}

.scrub-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0,0,0,0.4);
    width: 0%;
    z-index: 10;
    transition: width 0.1s linear;
}

.slit-drawer {
    grid-column: 1 / -1;
    background: #ffffff;
    overflow: hidden;
    height: 0;
    width: 100%;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    opacity: 0;
}

.slit-content {
    padding: 30px 0;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
}
.slit-content::-webkit-scrollbar { display: none; }

.slit-img {
    height: 280px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.slit-img:hover { transform: scale(1.02); }

.comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; 
}

.compare-wrapper {
    display: flex;
    gap: 20px;
    width: 90%;
    max-width: 1600px;
    height: 80vh;
    justify-content: center;
    align-items: center;
}

.compare-card {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compare-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #f0f0f0;
}

.compare-label {
    text-align: center;
    font-size: 14px;
    color: #999;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    cursor: pointer;
    color: #333;
    opacity: 0.6;
    transition: opacity 0.3s;
    line-height: 1;
}

.close-btn:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .compare-wrapper {
        flex-direction: column;
    }
}