.gallery-section {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.gallery-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 50px;
}

.gallery-viewport {
    width: 100%;
    overflow: hidden;
}

.gallery-nav-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-nav-btn:hover:not(.disabled) {
    background: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.gallery-nav-btn i {
    font-size: 1.2rem;
    color: #333;
}

.gallery-nav-btn.prev-btn {
    left: 0;
}

.gallery-nav-btn.next-btn {
    right: 0;
}

.gallery-nav-btn.disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

.pieces-gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    transition: transform .3s ease;
    padding: 0;
    box-sizing: border-box;
}

.gallery-item {
    flex-shrink: 0;
    width: calc(25% - 15px);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    transition: transform .3s ease, box-shadow .3s ease;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.gallery-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    background: #eee;
    overflow: hidden;
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.gallery-item-content {
    padding: 0;
    min-height: 0;
    flex-grow: 0;
    display: none;
}

@media(max-width: 768px) {
    .gallery-item {
        width: 100%;
    }
    .gallery-nav-btn {
        width: 36px;
        height: 36px;
    }
    .gallery-nav-btn i {
        font-size: 1rem;
    }
    .gallery-slider-container {
        padding: 0 40px;
    }
}

@media(max-width: 480px) {
    .pieces-gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item {
        width: 100%;
    }
    .gallery-slider-container {
        padding: 0 30px;
    }
}

@media (max-width: 800px) {
  .gallery-section {
    margin: 1.5rem 0 0 0;
    padding: 0;
  }
}