.toile-related-product__container {
    width: 100%;
    padding: 2rem 0;
}

.toile-related-product__layout {
    width: 100%;
}

.toile-related-product__topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
}

.toile-related-product__topbar-left,
.toile-related-product__topbar-right {
    flex: 0 0 auto;
}

.toile-related-product__topbar-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
}

.toile-related-product__title {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
    color: #111827;
}

.toile-related-product__topbar-right {
    margin-left: auto;
    width: auto;
    display: flex;
    justify-content: flex-end;
}

.toile-related-product__side {
    flex: 0 0 auto;
}

.toile-related-product__note {
    display: inline-block;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
    color: #9ca3af;
    font-style: italic;
    white-space: nowrap;
}

.toile-related-product__main {
    width: 100%;
    min-width: 0;
}

.toile-related-product__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.toile-related-product__grid > * {
    min-width: 0;
}

.toile-related-product__card {
    min-width: 0;
}

.toile-related-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.toile-related-product__image-wrap {
    position: relative;
    width: 100%;
    background: transparent;
    overflow: hidden;
    margin-bottom: .75rem;
}

.toile-related-product__image {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: grayscale(1) contrast(1.1) brightness(.95);
    transition: transform .7s ease-out, filter .4s ease;
}

.toile-related-product__link:hover .toile-related-product__image,
.toile-related-product__link:focus-visible .toile-related-product__image {
    transform: scale(1.05);
    filter: none;
}

.toile-related-product__image--placeholder {
    background: linear-gradient(135deg, #ececec, #f8f8f8);
}

.toile-related-product__name {
    display: inline-block;
    margin: 0;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 300;
    letter-spacing: .03em;
    text-transform: lowercase;
    transition: border-color .25s ease;
}

.toile-related-product__link:hover .toile-related-product__name,
.toile-related-product__link:focus-visible .toile-related-product__name {
    border-bottom-color: #111827;
}

.toile-related-product__index {
    margin-left: 2px;
    font-size: .6em;
}

.toile-related-product__empty {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.toile-related-product__catalog-link {
    display: inline-block;
    font-size: 12px;
    line-height: 1.2;
    color: inherit;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid #111827;
    white-space: nowrap;
    transition: opacity .2s ease;
}

.toile-related-product__catalog-link:hover,
.toile-related-product__catalog-link:focus-visible {
    opacity: .6;
}

@media (max-width: 575px) {
    .toile-related-product__topbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .toile-related-product__note,
    .toile-related-product__catalog-link {
        white-space: normal;
    }

    .toile-related-product__grid {
        display: flex;
        gap: .875rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .25rem;
        scrollbar-width: none;
    }

    .toile-related-product__grid::-webkit-scrollbar {
        display: none;
    }

    .toile-related-product__card {
        flex: 0 0 calc(50% - 0.4375rem);
        scroll-snap-align: start;
    }
}

@media (min-width: 768px) {
    .toile-related-product__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .toile-related-product__topbar {
        margin-bottom: 1.25rem;
    }
}
