.tooto-related-products {
    --tooto-related-duration: 240ms;
    position: relative;
    width: 100%;
    min-width: 0;
    margin-inline: auto;
    font-family: Poppins, sans-serif;
    /* Computed lengths let the controller use native responsive px/em/rem controls. */
    column-gap: var(--tooto-related-gap, 24px);
}

.tooto-related-products__stage {
    width: 100%;
}

.tooto-related-products .tooto-related-products__viewport {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.tooto-related-products .tooto-related-products__track {
    align-items: stretch;
}

.tooto-related-products .tooto-related-products__card {
    width: var(--tooto-related-slide-width, calc((100% - 48px) / 3));
    height: auto;
    min-width: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--tooto-related-image-gap, 19px);
}

.tooto-related-products__viewport:not(.swiper-initialized) {
    overflow-x: auto;
}

.tooto-related-products__viewport:not(.swiper-initialized) .tooto-related-products__track {
    gap: var(--tooto-related-gap, 24px);
}

.tooto-related-products__image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--tooto-related-surface, #f6f6f6);
}

.tooto-related-products__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(var(--tooto-related-image-scale, 1.25));
    transition: transform var(--tooto-related-duration);
}

.tooto-related-products__image:is(:hover, :focus-visible) img {
    transform: scale(calc(var(--tooto-related-image-scale, 1.25) * 1.035));
}

.tooto-related-products__body {
    display: flex;
    flex-direction: column;
    gap: var(--tooto-related-content-gap, 15px);
    min-width: 0;
    flex: 1;
}

.tooto-related-products__intro {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tooto-related-products .tooto-related-products__title,
.tooto-related-products .tooto-related-products__excerpt {
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.tooto-related-products__title {
    color: var(--tooto-related-title, #222);
    font: 500 16px/1.4 Poppins, sans-serif;
    text-transform: capitalize;
}

.tooto-related-products__excerpt {
    color: var(--tooto-related-excerpt, #767676);
    font-size: 14px;
    line-height: 1.6;
    min-height: 1.6em;
}

.tooto-related-products .tooto-related-products__meta {
    display: grid;
    grid-template-columns: fit-content(45%) minmax(0, 1fr);
    column-gap: 8px;
    margin: 0;
    padding-block: var(--tooto-related-content-gap, 15px);
    border-block: 1px solid var(--tooto-related-border, #eee);
    color: var(--tooto-related-meta, #111);
    font-size: 14px;
    line-height: 2;
}

.tooto-related-products__meta > div {
    display: contents;
}

.tooto-related-products .tooto-related-products__meta dt,
.tooto-related-products .tooto-related-products__meta dd {
    margin: 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooto-related-products__meta dt {
    color: var(--tooto-related-label, #767676);
    font-weight: 500;
}

.tooto-related-products__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: auto;
}

.tooto-related-products .tooto-related-products__action {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-width: 0;
    min-height: 45px;
    padding: 10px 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: var(--tooto-related-action, #767676);
    font: 500 16px/1.4 Poppins, sans-serif;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: color var(--tooto-related-duration), background-color var(--tooto-related-duration);
}

.tooto-related-products__action--add::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 25%;
    height: 50%;
    border-inline-start: 1px solid var(--tooto-related-border, #eee);
}

.tooto-related-products .tooto-related-products__action:is(:hover, :focus-visible, :active),
.tooto-related-products .tooto-related-products__action[aria-disabled="true"] {
    color: var(--tooto-related-accent, #f33030);
    background: var(--tooto-related-action-hover, #fafafa);
}

.tooto-related-products__action[aria-disabled="true"] {
    cursor: default;
}

.tooto-related-products .tooto-related-products__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc((100% - var(--tooto-related-pagination-height, 0px)) / 2);
    transform: translateY(-50%);
    width: max(44px, var(--tooto-related-arrow-size, 36px));
    height: max(44px, var(--tooto-related-arrow-size, 36px));
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: opacity var(--tooto-related-duration), background-color var(--tooto-related-duration);
}

.tooto-related-products__arrow--previous {
    right: calc(100% + min(var(--tooto-related-arrow-offset, 45px), var(--tooto-related-room-left, 100px) - max(44px, var(--tooto-related-arrow-size, 36px)) - 4px));
}

.tooto-related-products__arrow--next {
    left: calc(100% + min(var(--tooto-related-arrow-offset, 45px), var(--tooto-related-room-right, 100px) - max(44px, var(--tooto-related-arrow-size, 36px)) - 4px));
}

.tooto-related-products__arrow img {
    display: block;
    width: var(--tooto-related-arrow-size, 36px);
    height: var(--tooto-related-arrow-size, 36px);
}

.tooto-related-products__arrow--previous img {
    transform: rotate(180deg);
}

.tooto-related-products__arrow:disabled {
    opacity: .3;
    cursor: default;
}

.tooto-related-products__arrow:hover:not(:disabled) {
    background: var(--tooto-related-action-hover, #fafafa);
}

.tooto-related-products .tooto-related-products__pagination {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: var(--tooto-related-pagination-gap, 32px);
}

.tooto-related-products .tooto-related-products__dot {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    width: 6px;
    height: 24px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    opacity: 1;
    box-shadow: none;
    cursor: pointer;
    transition: width var(--tooto-related-duration);
}

.tooto-related-products__dot span {
    width: 100%;
    height: 6px;
    border-radius: 8px;
    background: #000;
    opacity: .5;
}

.tooto-related-products .tooto-related-products__dot.swiper-pagination-bullet-active {
    width: 22px;
}

.tooto-related-products__dot.swiper-pagination-bullet-active span {
    opacity: 1;
}

.tooto-related-products:focus-visible {
    outline: 2px solid var(--tooto-related-accent, #f33030);
    outline-offset: 5px;
}

.tooto-related-products :is(a, button):focus-visible {
    outline: 2px solid var(--tooto-related-accent, #f33030);
    outline-offset: -3px;
}

.tooto-related-products [hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .tooto-related-products {
        --tooto-related-duration: 0ms;
    }
}
