/* =========================================================
   FolkModa — related articles + related products
   Blog article page
   ========================================================= */

.folk-related-articles,
.folk-related-products {
    margin-top: 48px;
    min-width: 0;
}

.folk-related-section__head,
.folk-related-products__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.folk-related-section__title,
.folk-related-products__title {
    margin: 0;
    color: #252525;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 500;
}

.folk-related-section__nav,
.folk-related-products__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.folk-related-section__arrow,
.folk-related-products__arrow {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background: #fff;
    color: #252525;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.folk-related-section__arrow:hover,
.folk-related-products__arrow:hover {
    border-color: #252525;
    background: #252525;
    color: #fff;
}

.folk-related-section__arrow:disabled,
.folk-related-products__arrow:disabled {
    opacity: .28;
    cursor: default;
    pointer-events: none;
}

/* ---------- Related articles ---------- */

.folk-related-articles__viewport,
.folk-related-products__viewport {
    overflow: hidden;
    min-width: 0;
}

.folk-related-articles__track,
.folk-related-products__track {
    display: flex;
    align-items: stretch;
    gap: 20px;
    transition: transform .34s ease;
    will-change: transform;
}

.folk-related-article {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.folk-related-article:hover {
    transform: translateY(-2px);
    border-color: #dfdfdf;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}

.folk-related-article__image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f7f7f7;
}

.folk-related-article__image img {
    display: block;
    width: 100%;

    object-fit: cover;
    transition: transform .35s ease;
}

.folk-related-article:hover .folk-related-article__image img {
    transform: scale(1.025);
}

.folk-related-article__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 17px;
}

.folk-related-article__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.folk-related-article__category {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f4f1ed;
    color: #756a60;
    font-size: 11px;
    line-height: 1.25;
}

.folk-related-article__date {
    margin-bottom: 8px;
    color: #999;
    font-size: 12px;
    line-height: 1.35;
}

.folk-related-article__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
    color: #252525 !important;
    text-decoration: none !important;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 500;
}

.folk-related-article__title:hover {
    color: #8d755f !important;
}

.folk-related-article__description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin-bottom: 16px;
    color: #777;
    font-size: 14px;
    line-height: 1.55;
}

.folk-related-article__more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    color: #252525 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
}

.folk-related-article__more svg {
    transition: transform .18s ease;
}

.folk-related-article__more:hover svg {
    transform: translateX(3px);
}

/* ---------- Related products ---------- */

.folk-related-product {
    position: relative;
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
    padding: 12px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
}

.folk-related-product__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.folk-related-product__image-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folk-related-product__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.folk-related-product__wishlist {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
}

.folk-related-product__stickers {
    position: absolute;
    z-index: 2;
    top: 8px;
    left: 8px;
}

.folk-related-product__discount {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 4px;
    background: #e3424b;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.folk-related-product__caption {
    padding-top: 12px;
}

.folk-related-product__name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 40px;
    color: #252525 !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 1.45;
}

.folk-related-product__price {
    min-height: 28px;
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.folk-related-product__price-old {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
}

.folk-related-product__price-new,
.folk-related-product__price-current {
    color: #252525;
    font-size: 18px;
    font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .folk-related-article {
        flex-basis: calc((100% - 16px) / 2);
    }

    .folk-related-product {
        flex-basis: calc((100% - 32px) / 3);
    }

    .folk-related-articles__track,
    .folk-related-products__track {
        gap: 16px;
    }
}

@media (max-width: 767.98px) {
    .folk-related-articles,
    .folk-related-products {
        margin-top: 36px;
    }

    .folk-related-section__head,
    .folk-related-products__head {
        margin-bottom: 16px;
    }

    .folk-related-section__title,
    .folk-related-products__title {
        font-size: 22px;
    }

    .folk-related-section__arrow,
    .folk-related-products__arrow {
        width: 36px;
        height: 36px;
    }

    .folk-related-articles__viewport,
    .folk-related-products__viewport {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .folk-related-articles__viewport::-webkit-scrollbar,
    .folk-related-products__viewport::-webkit-scrollbar {
        display: none;
    }

    .folk-related-articles__track,
    .folk-related-products__track {
        transform: none !important;
        transition: none;
        width: max-content;
    }

    .folk-related-article {
        flex: 0 0 min(82vw, 330px);
        width: min(82vw, 330px);
        scroll-snap-align: start;
    }

    .folk-related-product {
        flex: 0 0 min(45vw, 210px);
        width: min(45vw, 210px);
        scroll-snap-align: start;
    }

    .folk-related-article__body {
        padding: 15px;
    }

    .folk-related-article__title {
        font-size: 16px;
    }
}


/* =========================================================
   FIX: article section must occupy the full content width.
   The parent on this theme can behave as a flex container,
   which otherwise makes the articles section shrink to one card.
   ========================================================= */
.folk-related-articles {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    min-width: 0;
}

.folk-related-articles .folk-related-section__head {
    width: 100%;
}

.folk-related-articles__viewport {
    width: 100%;
    max-width: 100%;
}

.folk-related-articles__track {
    width: 100%;
    min-width: 0;
}

.folk-related-article {
    box-sizing: border-box;
    overflow: hidden;
}

.folk-related-article__body,
.folk-related-article__title,
.folk-related-article__description {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.folk-related-article__title,
.folk-related-article__description {
    overflow: hidden;
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .folk-related-article {
        flex: 0 0 calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .folk-related-article {
        flex: 0 0 calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}
