.toode-product--with-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: clamp(32px, 5vw, 80px);
    align-items: start;
}

.toode-details {
    min-width: 0;
    max-width: 700px;
    padding-top: 28px;
}

.toode-details > div {
    max-width: 500px;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.toode-sample {
    position: relative;
    display: block;
    width: 350px;
    max-width: 100%;
    margin-bottom: 24px;
    cursor: zoom-in;
}

.toode-sample-image {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    box-shadow: none;
}

.toode-details h1 {
    margin: 0 0 24px;
    overflow-wrap: anywhere;
}

.toode-product > h2,
.toode-product > .referentsid {
    grid-column: 1 / -1;
}

.toode-gallery {
    min-width: 0;
    padding-top: 28px;
}

.toode-gallery-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 16px;
}

.toode-gallery-link {
    position: relative;
    display: block;
    height: clamp(160px, 15vw, 210px);
    overflow: hidden;
    background: #f2f3f3;
    cursor: zoom-in;
}

.toode-gallery-link:nth-child(3n),
.toode-gallery-link:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    height: auto;
    aspect-ratio: 2 / 1;
}

.toode-gallery-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 200ms ease;
}

.toode-gallery-link:hover img {
    transform: scale(1.025);
}

.toode-gallery-link:focus-visible,
.toode-sample:focus-visible {
    outline: 3px solid #ee4036;
    outline-offset: 4px;
}

.toode-gallery-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.94);
    color: #334653;
    border-radius: 50%;
    pointer-events: none;
}

@media (max-width: 900px) {
    .toode-product--with-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .toode-gallery {
        width: 100%;
        max-width: 700px;
        padding-top: 32px;
        margin-bottom: 16px;
    }

    .toode-gallery-link {
        height: clamp(160px, 30vw, 260px);
    }
}

@media (max-width: 500px) {
    .toode-product {
        margin-top: 0;
    }

    .toode-details {
        padding-top: 8px;
    }

    .toode-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .toode-gallery-link {
        height: clamp(140px, 42vw, 200px);
    }

    .toode-gallery-link:nth-child(3n),
    .toode-gallery-link:last-child:nth-child(3n + 1) {
        aspect-ratio: 3 / 2;
    }

    .toode-gallery-zoom {
        right: 8px;
        bottom: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toode-gallery-link img {
        transition: none;
    }
}
