.wrapper {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery .image {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    height: 250px;
}

.gallery .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery .image:hover img {
    transform: scale(1.1);
}

/* Preview Box */
.preview-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 900px;
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
}

.preview-box.show {
    opacity: 1;
    pointer-events: auto;
}

.preview-box .details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.details .title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #2c3e50;
}

.details .title p {
    margin: 0;
    font-weight: 500;
}

.details .icon {
    font-size: 20px;
    cursor: pointer;
}

.image-box {
    position: relative;
    width: 100%;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-box img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.slide i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.slide.prev i {
    padding-right: 3px; /* penyesuaian untuk panah kiri */
}

.slide.next i {
    padding-left: 3px; /* penyesuaian untuk panah kanan */
}

.slide:hover {
    background: rgba(0,0,0,0.8);
}

.slide.prev {
    left: 20px;
}

.slide.next {
    right: 20px;
}

.shadow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
    display: none;
}

.shadow.show {
    display: block;
}