/**
 * Khối sản phẩm liên quan ở cuối trang sản phẩm.
 * Dùng chung vỏ .full_content_bg của theme nên chỉ cần định nghĩa tiêu đề và lưới thẻ.
 */
.devvn_related_section {
    margin: 15px 0 0 0;
}

/* Tiêu đề: gạch màu bên trái để tách khỏi khối "Thông tin chi tiết" phía trên */
.devvn_related_section h2.mycodes_title {
    position: relative;
    padding: 0 0 12px 14px;
    margin: 0 0 18px 0;
    border-bottom: 1px solid #eceff3;
}

.devvn_related_section h2.mycodes_title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 5px;
    height: 26px;
    border-radius: 3px;
    background: #145688;
}

.devvn_related_grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 18px;
}

.devvn_related_card {
    min-width: 0;
}

.devvn_related_thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f2f4f7;
    aspect-ratio: 16 / 10;
    border: 1px solid #eceff3;
}

.devvn_related_thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.devvn_related_card:hover .devvn_related_thumb img {
    transform: scale(1.06);
}

.devvn_related_name {
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.45;
}

.devvn_related_name a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
    text-decoration: none;
    transition: color .2s ease;
}

.devvn_related_name a:hover {
    color: #145688;
}

@media (max-width: 991px) {
    .devvn_related_grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 14px;
    }
}

@media (max-width: 650px) {
    .devvn_related_section h2.mycodes_title {
        font-size: 20px;
        line-height: 28px;
        padding-bottom: 10px;
        margin-bottom: 14px;
    }

    .devvn_related_section h2.mycodes_title:before {
        height: 22px;
        top: 3px;
    }

    .devvn_related_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px;
    }

    .devvn_related_name {
        font-size: 13.5px;
    }
}
