nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 5em 0 5em;
}

nav h1 {
    font-size: 1.8rem;
    color: rgb(253, 252, 252);
    font-weight: normal;
}

nav ul li a {
    border-radius: 0.5em;
}

nav ul li:nth-child(4) a:hover {
    cursor: pointer;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    padding: 4em 12em 3em 12em;
    color: #2c3e50;
}

.collection-header h1 {
    font-size: 2.6rem;
    color: #1859bb;
}

.collection-section {
    padding: 4em 2em;
    background-color: #f9f9f9;
    margin-bottom: 3em;
}

.product-gallery {
    display: flex;
    justify-content: center;
    max-width: 1600px;
    margin: 0 auto;
}

.product-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3em;
    width: 100%;
    max-width: 100%;
}

.product-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-details h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5em;
    font-weight: normal;
}

.product-details p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
    text-align: justify;
}

.image-gallery {
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 50%;
    min-width: 500px;
    max-width: 800px;
    height: 600px;
    border-radius: 0.8em;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 0.5em;
}

.image-gallery img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    max-width: 98%;
    max-height: 98%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.image-gallery img.active {
    opacity: 1;
    z-index: 1;
}

.image-gallery button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 1.5rem;
    padding: 0.5em 0.6em;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    transition: background 0.2s;
}

.image-gallery button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.image-gallery .prev {
    left: 10px;
}

.image-gallery .next {
    right: 10px;
}

@media screen and (max-width: 800px) {
    nav {
        padding-left: 2em;
    }

    .collection-header {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 3em 1em 1em 1em;
    }

    .collection-section {
        padding: 2em 1em;
    }

    .product-gallery {
        padding: 0 1em;
    }

    .product-item {
        flex-direction: column;
        gap: 2em;
    }

    .image-gallery {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 300px;
        padding: 1em;
    }

    .product-details h2 {
        font-size: 1.6rem;
        text-align: center;
        margin-bottom: 1em;
    }

    .product-details p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
    }
}

